{"action":"created","issue":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/8445","labels_url":"https://api.github.com/repos/xbmc/xbmc/issues/8445/labels{/name}","comments_url":"https://api.github.com/repos/xbmc/xbmc/issues/8445/comments","events_url":"https://api.github.com/repos/xbmc/xbmc/issues/8445/events","html_url":"https://github.com/xbmc/xbmc/pull/8445","id":119022535,"number":8445,"title":"[PVR] Mark Created ChannnelGroups as Loaded on Persist (extra fix #16365)","user":{"login":"metaron-uk","id":12870817,"avatar_url":"https://avatars.githubusercontent.com/u/12870817?v=3","gravatar_id":"","url":"https://api.github.com/users/metaron-uk","html_url":"https://github.com/metaron-uk","followers_url":"https://api.github.com/users/metaron-uk/followers","following_url":"https://api.github.com/users/metaron-uk/following{/other_user}","gists_url":"https://api.github.com/users/metaron-uk/gists{/gist_id}","starred_url":"https://api.github.com/users/metaron-uk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metaron-uk/subscriptions","organizations_url":"https://api.github.com/users/metaron-uk/orgs","repos_url":"https://api.github.com/users/metaron-uk/repos","events_url":"https://api.github.com/users/metaron-uk/events{/privacy}","received_events_url":"https://api.github.com/users/metaron-uk/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/Jarvis","name":"Jarvis","color":"fbca04"},{"url":"https://api.github.com/repos/xbmc/xbmc/labels/PVR","name":"PVR","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/xbmc/xbmc/milestones/73","html_url":"https://github.com/xbmc/xbmc/milestones/Jarvis%2016.0-beta3","labels_url":"https://api.github.com/repos/xbmc/xbmc/milestones/73/labels","id":1423647,"number":73,"title":"Jarvis 16.0-beta3","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":3,"closed_issues":17,"state":"open","created_at":"2015-11-22T09:05:01Z","updated_at":"2015-11-27T09:26:13Z","due_on":"2015-11-28T23:00:00Z","closed_at":null},"comments":6,"created_at":"2015-11-26T11:06:16Z","updated_at":"2015-11-27T13:29:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/8445","html_url":"https://github.com/xbmc/xbmc/pull/8445","diff_url":"https://github.com/xbmc/xbmc/pull/8445.diff","patch_url":"https://github.com/xbmc/xbmc/pull/8445.patch"},"body":"https://github.com/xbmc/xbmc/pull/8439 changed 'Persist' so it will save a newly created group.\r\n\r\nThe problem is this happens before any channels are added to the group.\r\nWhen you click 'OK' after subsequently adding channels to the group, it now has a channel_id.\r\nAs the group isn't marked as 'loaded', the new changes aren't persisted.\r\n\r\nWhen you subsequently restart kodi, your newly created group has no channels, so it isn't loaded...\r\n\r\nThis PR marks user created groups as 'loaded' on first 'persist' which means you can't use the 'loaded' flag to indicate stuff exclusively pulled from the database anymore, but I don't see anything doing that. \r\n\r\nI considered trying something 'more correct' but modifying the persist logic on load looked like it would be too complex / invasive.\r\n\r\npings: @ksooo @Jalle19 "},"comment":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/comments/160140052","html_url":"https://github.com/xbmc/xbmc/pull/8445#issuecomment-160140052","issue_url":"https://api.github.com/repos/xbmc/xbmc/issues/8445","id":160140052,"user":{"login":"Jalle19","id":1106133,"avatar_url":"https://avatars.githubusercontent.com/u/1106133?v=3","gravatar_id":"","url":"https://api.github.com/users/Jalle19","html_url":"https://github.com/Jalle19","followers_url":"https://api.github.com/users/Jalle19/followers","following_url":"https://api.github.com/users/Jalle19/following{/other_user}","gists_url":"https://api.github.com/users/Jalle19/gists{/gist_id}","starred_url":"https://api.github.com/users/Jalle19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jalle19/subscriptions","organizations_url":"https://api.github.com/users/Jalle19/orgs","repos_url":"https://api.github.com/users/Jalle19/repos","events_url":"https://api.github.com/users/Jalle19/events{/privacy}","received_events_url":"https://api.github.com/users/Jalle19/received_events","type":"User","site_admin":false},"created_at":"2015-11-27T13:29:59Z","updated_at":"2015-11-27T13:29:59Z","body":"I don't mind."}}