{"action":"created","issue":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/10553","repository_url":"https://api.github.com/repos/xbmc/xbmc","labels_url":"https://api.github.com/repos/xbmc/xbmc/issues/10553/labels{/name}","comments_url":"https://api.github.com/repos/xbmc/xbmc/issues/10553/comments","events_url":"https://api.github.com/repos/xbmc/xbmc/issues/10553/events","html_url":"https://github.com/xbmc/xbmc/pull/10553","id":179043477,"number":10553,"title":"Setting album user rating using album ID not GetAlbumIdByPath","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":"0b02e1"},{"url":"https://api.github.com/repos/xbmc/xbmc/labels/Krypton","name":"Krypton","color":"fbca04"},{"url":"https://api.github.com/repos/xbmc/xbmc/labels/Music","name":"Music","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-24T18:06:25Z","updated_at":"2016-09-25T17:51:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/10553","html_url":"https://github.com/xbmc/xbmc/pull/10553","diff_url":"https://github.com/xbmc/xbmc/pull/10553.diff","patch_url":"https://github.com/xbmc/xbmc/pull/10553.patch"},"body":"Fixes a bug when setting album user rating when the user has songs from more than one album in the same folder.\r\n\r\nThere is nothing to say that all albums must have a unique folder that does not contain songs from any other album, even if this is the common way to organise your music files.  Path may not be sufficient to identify an album uniquely. Hence `GetAlbumIdByPath` needs to allow for more than one album being found for a path, just as `GetAlbumByName` and `GetArtistByName` do, rather than return the ID of the first in the results set.\r\n\r\nSetting album user rating was using path to attempt to identify the album when the unique album ID is readily available. Switch to use ID not path.\r\n\r\nAlso `SetAlbumVotes` was removed as it was unused. The idea seems to be that \"rating\" and \"votes\" are values loaded from scraping NFO or online sources, and are never set via the GUI, hence this routine was unnecessary as  votes are never set in isolation ( and there is no routine to set rating).  Rating and votes are loaded by `CAlbum::Load`.\r\n\r\n@Razzeee perhaps you would like to comment as you did the original work on this in  #8405\r\n@zag2me most likely to have data to test this out.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/comments/249435539","html_url":"https://github.com/xbmc/xbmc/pull/10553#issuecomment-249435539","issue_url":"https://api.github.com/repos/xbmc/xbmc/issues/10553","id":249435539,"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},"created_at":"2016-09-25T17:51:51Z","updated_at":"2016-09-25T17:51:51Z","body":"To test this fix put music files from more than one album all in the same folder. Add folder as new music source and scan into music library. Edit the user rating for the different albums from the Album Info dialog, and see them being correctly applied when you look at the albums node (sorted by \"my rating\").\r\n\r\nWithout this fix when you change the user rating for an album once you leave the Album Info dialog then actual edit is applied to the first album."}}
{"actor":{"display_login":"DaveTBlake"}}