{"action":"created","issue":{"url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/issues/126","repository_url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv","labels_url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/issues/126/labels{/name}","comments_url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/issues/126/comments","events_url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/issues/126/events","html_url":"https://github.com/LibreELEC/LibreELEC.tv/pull/126","id":146734556,"number":126,"title":"kodi-config: Hack to work around repo issue following OE-to-LE migration","user":{"login":"MilhouseVH","id":805038,"avatar_url":"https://avatars.githubusercontent.com/u/805038?v=3","gravatar_id":"","url":"https://api.github.com/users/MilhouseVH","html_url":"https://github.com/MilhouseVH","followers_url":"https://api.github.com/users/MilhouseVH/followers","following_url":"https://api.github.com/users/MilhouseVH/following{/other_user}","gists_url":"https://api.github.com/users/MilhouseVH/gists{/gist_id}","starred_url":"https://api.github.com/users/MilhouseVH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MilhouseVH/subscriptions","organizations_url":"https://api.github.com/users/MilhouseVH/orgs","repos_url":"https://api.github.com/users/MilhouseVH/repos","events_url":"https://api.github.com/users/MilhouseVH/events{/privacy}","received_events_url":"https://api.github.com/users/MilhouseVH/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/labels/Bugfix","name":"Bugfix","color":"fc2929"},{"url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/labels/Kodi","name":"Kodi","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-04-07T20:33:16Z","updated_at":"2016-04-07T21:38:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/pulls/126","html_url":"https://github.com/LibreELEC/LibreELEC.tv/pull/126","diff_url":"https://github.com/LibreELEC/LibreELEC.tv/pull/126.diff","patch_url":"https://github.com/LibreELEC/LibreELEC.tv/pull/126.patch"},"body":"An OE Kodi 16 installation will, naturally enough, have an Addons*.db that is populated with OE addons linked to the `repository.openelec.tv` repo.\r\n\r\nHowever, following the migration to LE, Kodi 16 adds the same addons to Addons*.db, but now for the `repository.libreelec.tv` repo - the old OE addons are still present in the database, even though the `repository.openelec.tv` repo no longer exists.\r\n\r\nSo now, for example, there will be two `pvr.demo` addons in the `addon` table, one linked to the OE repo (usually with a low id, ie. 8) and again for the LE repo, but now with a much higher id, eg. 980.\r\n\r\nWhen the user attempts to install the `pvr.demo` addon from the LE repository, Kodi seems to use the first addon it comes across, which is typically the addon with the lowest id and thus the legacy addon linked to the now non-existant `repository.openelec.tv`. Result: nothing happens - no error is shown to the user, or written to the log. The addon simply fails to install, silently.\r\n\r\nAs a quick fix, this PR simply deletes the OE repository and all associated addons from the latest pre-v21 Addons*.db. It also creates a backup, should the user decide to go back to OE.\r\n\r\nIdeally, Kodi 16 would simply ignore those addons linked to repositories that are no longer available/valid.\r\n\r\nMerge if nobody finds a better solution to the problem."},"comment":{"url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/issues/comments/207098087","html_url":"https://github.com/LibreELEC/LibreELEC.tv/pull/126#issuecomment-207098087","issue_url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/issues/126","id":207098087,"user":{"login":"MilhouseVH","id":805038,"avatar_url":"https://avatars.githubusercontent.com/u/805038?v=3","gravatar_id":"","url":"https://api.github.com/users/MilhouseVH","html_url":"https://github.com/MilhouseVH","followers_url":"https://api.github.com/users/MilhouseVH/followers","following_url":"https://api.github.com/users/MilhouseVH/following{/other_user}","gists_url":"https://api.github.com/users/MilhouseVH/gists{/gist_id}","starred_url":"https://api.github.com/users/MilhouseVH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MilhouseVH/subscriptions","organizations_url":"https://api.github.com/users/MilhouseVH/orgs","repos_url":"https://api.github.com/users/MilhouseVH/repos","events_url":"https://api.github.com/users/MilhouseVH/events{/privacy}","received_events_url":"https://api.github.com/users/MilhouseVH/received_events","type":"User","site_admin":false},"created_at":"2016-04-07T21:38:28Z","updated_at":"2016-04-07T21:38:28Z","body":"I've had to revise the logic slightly, to account for an indecisive user that migrates from OE to LE, returns to OE (automatically adding back the addons/repositories, although now with \"higher\" the LE ids, meaning any addon problems are now shifted to OE), then maybe later they decide to try LE again... Although LE would probably function correctly as it now has the lower id's it's a bit of a gamble, so with this revised PR the OE addons/repositories will always be removed whenever they are detected."}}