## Bug report
### Describe the bug
Here is a clear and concise description of …what the problem is:
Calling AudioLibrary.GetArtists with "albumartistsonly": false returns "isalbumartist": false for most artists when the request properties don't contain "songgenres", while (many of) the artists in fact -are- album artists.
When calling the same request but adding property "songgenres" the returned "isalbumartist" properties are correct
## Expected Behavior
Here is a clear and concise description of what was expected to happen:
I expect AudioLibrary.GetArtists to always return the same (correct) values for "isalbumartist", so true if they are album arists, and false if they arent, regarless of whether I also request "songgenres"
## Actual Behavior
AudioLibrary.GetArtists returns incorrect (false negative, and probably also false positives) "isalbumartist" values when you don't request "songgenres"
## Possible Fix
From the debug log I notice that when genre and songgenres are ommitted, the resulting query looks like
`SELECT
a1.*,
isSong,
art.art_id AS idArt,
art.type AS artType,
art.url AS artURL [.....] GROUP BY
a1.idArtist,
art.art_id
ORDER BY
a1.idArtist,
isSong,
arttype`
that is, "isSong" is not in the `GROUP BY`, while I believe it should be, because both the records where isSong = 0 and isSong = 1 should be included in the result.
This is not a problem when "songgenres" are also requested, because in that case
`idSongGenreAlbum, idSongGenreSong,`
appears in the GROUP BY, making (by accident) the correct distinct isSong fields to appear.
### To Reproduce
Steps to reproduce the behavior:
1. Call the JSON-RPC API with
<pre>
{
"jsonrpc": "2.0",
"method": "AudioLibrary.GetArtists",
"params": {
"albumartistsonly": false,
"properties": [
"style",
"description",
"born",
"died",
"thumbnail",
"instrument",
"fanart",
"type",
"gender",
"isalbumartist",
"sortname"
],
"limits": { "start": 0, "end": 1000 }
},
"id": 1
}
</pre>
2. See that the result contains artists with property "isalbumartist":false, where they actually -are- album artists. this is the wrong behavior
3. Now do the same request, only adding extra "songgenres" property:
<pre>
{
"jsonrpc": "2.0",
"method": "AudioLibrary.GetArtists",
"params": {
"albumartistsonly": false,
"properties": [
"style",
"description",
"born",
"died",
"thumbnail",
"instrument",
"fanart",
"type",
"gender",
"isalbumartist",
"sortname",
"songgenres"
],
"limits": { "start": 0, "end": 1000 }
},
"id": 1
}
</pre>
4. See that in the result "isalbumartist" is true (correct) for artists where it was false in the previous request
### Debuglog
The debuglog can be found here:
https://pastebin.com/Z1NS5DnA
### Screenshots
Here are some links or screenshots to help explain the problem:
## Additional context or screenshots (if appropriate)
Here is some additional context or explanation that might help:
### Your Environment
Used Operating system:
- [ ] Android
- [ ] iOS
- [ ] Linux
- [ ] OSX
- [x] Raspberry-Pi
- [x] Windows
- [ ] Windows UWP
- Operating system version/name:
- Kodi version: 18.6
Not sure if relevant, but I'm using MySQL database
*note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.*