{"action":"created","issue":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/8268","labels_url":"https://api.github.com/repos/xbmc/xbmc/issues/8268/labels{/name}","comments_url":"https://api.github.com/repos/xbmc/xbmc/issues/8268/comments","events_url":"https://api.github.com/repos/xbmc/xbmc/issues/8268/events","html_url":"https://github.com/xbmc/xbmc/pull/8268","id":112348324,"number":8268,"title":"[Fix]Sorting by (music) Artist and JSON GetAlbums broken by #8158","user":{"login":"DaveTBlake","id":13371422,"avatar_url":"https://avatars.githubusercontent.com/u/13371422?v=3","gravatar_id":"","url":"https://api.github.com/users/DaveTBlake","html_url":"https://github.com/DaveTBlake","followers_url":"https://api.github.com/users/DaveTBlake/followers","following_url":"https://api.github.com/users/DaveTBlake/following{/other_user}","gists_url":"https://api.github.com/users/DaveTBlake/gists{/gist_id}","starred_url":"https://api.github.com/users/DaveTBlake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaveTBlake/subscriptions","organizations_url":"https://api.github.com/users/DaveTBlake/orgs","repos_url":"https://api.github.com/users/DaveTBlake/repos","events_url":"https://api.github.com/users/DaveTBlake/events{/privacy}","received_events_url":"https://api.github.com/users/DaveTBlake/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/xbmc/xbmc/labels/Fix","name":"Fix","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/xbmc/xbmc/milestones/70","html_url":"https://github.com/xbmc/xbmc/milestones/Jarvis%2016.0-alpha4","labels_url":"https://api.github.com/repos/xbmc/xbmc/milestones/70/labels","id":1315988,"number":70,"title":"Jarvis 16.0-alpha4","description":"","creator":{"login":"MartijnKaijser","id":907436,"avatar_url":"https://avatars.githubusercontent.com/u/907436?v=3","gravatar_id":"","url":"https://api.github.com/users/MartijnKaijser","html_url":"https://github.com/MartijnKaijser","followers_url":"https://api.github.com/users/MartijnKaijser/followers","following_url":"https://api.github.com/users/MartijnKaijser/following{/other_user}","gists_url":"https://api.github.com/users/MartijnKaijser/gists{/gist_id}","starred_url":"https://api.github.com/users/MartijnKaijser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartijnKaijser/subscriptions","organizations_url":"https://api.github.com/users/MartijnKaijser/orgs","repos_url":"https://api.github.com/users/MartijnKaijser/repos","events_url":"https://api.github.com/users/MartijnKaijser/events{/privacy}","received_events_url":"https://api.github.com/users/MartijnKaijser/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":93,"state":"open","created_at":"2015-09-21T09:47:25Z","updated_at":"2015-10-20T11:43:24Z","due_on":"2015-10-30T23:00:00Z","closed_at":null},"comments":1,"created_at":"2015-10-20T11:39:02Z","updated_at":"2015-10-20T11:43:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/8268","html_url":"https://github.com/xbmc/xbmc/pull/8268","diff_url":"https://github.com/xbmc/xbmc/pull/8268.diff","patch_url":"https://github.com/xbmc/xbmc/pull/8268.patch"},"body":"Unfortunately the removeal of artist vector from CSong and CAlbum in #8158 has broken the sortbyartist and sortbyartistthenyear sorts because FieldArtist is not being populated. It also impacted AudioLibrary.GetAlbums resulting in no artists being returned.\r\n\r\n(Please note that the sort problem is nothing to do with the recent format changes in #8267)\r\n\r\nFunctionality is restored by building a vector of artist names by splitting the artist description string, whenever song or album artist credits has not been populated. \r\n\r\nHowever since we now process the ARTISTS tag it is possible that the splitting the string may not give the same artists as held in the song_artist or album_artist tables, so could lead to discrepencies. In particular in the json rpc using GetAlbums the array of artists for an album may not match the array of artistIds.  AudioLibrary::GetAlbums needs to query album_artist table for both artists and artistIds.\r\n\r\n@evilhamster this is the best fix in the short term, I think we will want to query the song_artist and album_artist tables most places in the furture anyway.\r\n@jjd-uk you may want to retest the sort displays after both this and #8267 are merged. \r\n@Montellese I know that JSON needs a better fix, at least this gets us back where we were. \r\nTidy-up is never easy is it @Razzeee !\r\n"},"comment":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/comments/149535862","html_url":"https://github.com/xbmc/xbmc/pull/8268#issuecomment-149535862","issue_url":"https://api.github.com/repos/xbmc/xbmc/issues/8268","id":149535862,"user":{"login":"Razzeee","id":5943908,"avatar_url":"https://avatars.githubusercontent.com/u/5943908?v=3","gravatar_id":"","url":"https://api.github.com/users/Razzeee","html_url":"https://github.com/Razzeee","followers_url":"https://api.github.com/users/Razzeee/followers","following_url":"https://api.github.com/users/Razzeee/following{/other_user}","gists_url":"https://api.github.com/users/Razzeee/gists{/gist_id}","starred_url":"https://api.github.com/users/Razzeee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Razzeee/subscriptions","organizations_url":"https://api.github.com/users/Razzeee/orgs","repos_url":"https://api.github.com/users/Razzeee/repos","events_url":"https://api.github.com/users/Razzeee/events{/privacy}","received_events_url":"https://api.github.com/users/Razzeee/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T11:43:36Z","updated_at":"2015-10-20T11:43:36Z","body":"jenkins build this please"}}