{"action":"created","issue":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/14507","repository_url":"https://api.github.com/repos/xbmc/xbmc","labels_url":"https://api.github.com/repos/xbmc/xbmc/issues/14507/labels{/name}","comments_url":"https://api.github.com/repos/xbmc/xbmc/issues/14507/comments","events_url":"https://api.github.com/repos/xbmc/xbmc/issues/14507/events","html_url":"https://github.com/xbmc/xbmc/pull/14507","id":365732009,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NTc5NDA1","number":14507,"title":"Add PVR_TIMER_TYPE_SUPPORTS_READONLY_DELETE flag","user":{"login":"djp952","id":706055,"node_id":"MDQ6VXNlcjcwNjA1NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/706055?v=4","gravatar_id":"","url":"https://api.github.com/users/djp952","html_url":"https://github.com/djp952","followers_url":"https://api.github.com/users/djp952/followers","following_url":"https://api.github.com/users/djp952/following{/other_user}","gists_url":"https://api.github.com/users/djp952/gists{/gist_id}","starred_url":"https://api.github.com/users/djp952/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djp952/subscriptions","organizations_url":"https://api.github.com/users/djp952/orgs","repos_url":"https://api.github.com/users/djp952/repos","events_url":"https://api.github.com/users/djp952/events{/privacy}","received_events_url":"https://api.github.com/users/djp952/received_events","type":"User","site_admin":false},"labels":[{"id":13087449,"node_id":"MDU6TGFiZWwxMzA4NzQ0OQ==","url":"https://api.github.com/repos/xbmc/xbmc/labels/Improvement","name":"Improvement","color":"0b02e1","default":false},{"id":278206009,"node_id":"MDU6TGFiZWwyNzgyMDYwMDk=","url":"https://api.github.com/repos/xbmc/xbmc/labels/PVR%20API%20Change","name":"PVR API Change","color":"e11d21","default":false},{"id":400751192,"node_id":"MDU6TGFiZWw0MDA3NTExOTI=","url":"https://api.github.com/repos/xbmc/xbmc/labels/v18%20Leia","name":"v18 Leia","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-02T04:00:39Z","updated_at":"2018-10-02T06:04:11Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/14507","html_url":"https://github.com/xbmc/xbmc/pull/14507","diff_url":"https://github.com/xbmc/xbmc/pull/14507.diff","patch_url":"https://github.com/xbmc/xbmc/pull/14507.patch"},"body":"This PR adds a new PVR flag, PVR_TIMER_TYPE_SUPPORTS_READONLY_DELETE, and updates the PVR API to 5.10.3 (compatible with 5.10.0)\r\n\r\n## Description\r\nThe new flag is intended to allow PVRs to specify timer types that are generally read-only in nature but still allow deletion through Kodi.  The existing PVR_TIMER_TYPE_IS_READONLY flag does not allow deletion when specified as a PVR timer type flag.\r\n\r\n## Motivation and Context\r\nAdmittedly this is a niche case that may only benefit my PVR client addon (https://github.com/djp952/pvr.hdhomerundvr).  The motivation is that timers/timer rules may be generally read-only in nature in that the user cannot modify the parameters of the timer (rule), but that also excludes them from deleting the timer (rule) in the existing implementation.  This proposed change adds a flag that indicates a read-only timer can still be deleted by the user.\r\n\r\n## How Has This Been Tested?\r\nThis has been tested using my own PVR client (https://github.com/djp952/pvr.hdhomerundvr) for the HDHomeRun DVR system, on Windows 10 x64 using the latest XBMC code available at the time of the PR.  I set breakpoints at each place the existing PVRTimerType::IsReadOnly() is invoked and made a determination if my proposed function PVRTimerType::SupportsReadOnlyDelete() should be invoked to negate that result.  I only found two places where this would be relevant - when deciding if the \"Delete\" option should be shown, and again when the Delete Timer operation is invoked.\r\n\r\nTo unit test the change, I incremented the PVR API to version 5.10.3 and added a handful of MANUAL timers via my PVR.  I confirmed that I did not have to increment the PVR API version in my addon.xml file, and stepped through the aforementioned breakpoints.  The Kodi UI presented me with Delete option(s) that were not available prior to the change, and they worked as expected.  I also confirmed that the Edit option(s) that were now presented display a read-only view of the Timer (Rule) as expected.\r\n\r\nIt may go without saying, but I recommend ksooo review this PR and decide if it's too much of a niche case for inclusion or if there is a more ambitious plan in the works for future versions that would negate this change or otherwise render it useless.\r\n\r\n## Types of change\r\n- [ ] **Bug fix** (non-breaking change which fixes an issue)\r\n- [ ] **Clean up** (non-breaking change which removes non-working, unmaintained functionality)\r\n- [X] **Improvement** (non-breaking change which improves existing functionality)\r\n- [ ] **New feature** (non-breaking change which adds functionality)\r\n- [ ] **Breaking change** (fix or feature that will cause existing functionality to change)\r\n- [ ] **Cosmetic change** (non-breaking change that doesn't touch code)\r\n- [ ] **None of the above** (please explain below)\r\n\r\n## Checklist:\r\n- [X] My code follows the **[Code Guidelines](https://github.com/xbmc/xbmc/blob/master/docs/CODE_GUIDELINES.md)** of this project \r\n- [X] My change requires a change to the documentation, either Doxygen or wiki\r\n- [ ] I have updated the documentation accordingly\r\n- [X] I have read the **[Contributing](https://github.com/xbmc/xbmc/blob/master/docs/CONTRIBUTING.md)** document\r\n- [ ] I have added tests to cover my change\r\n- [ ] All new and existing tests passed\r\n"},"comment":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/comments/426158951","html_url":"https://github.com/xbmc/xbmc/pull/14507#issuecomment-426158951","issue_url":"https://api.github.com/repos/xbmc/xbmc/issues/14507","id":426158951,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjE1ODk1MQ==","user":{"login":"ksooo","id":3226626,"node_id":"MDQ6VXNlcjMyMjY2MjY=","avatar_url":"https://avatars3.githubusercontent.com/u/3226626?v=4","gravatar_id":"","url":"https://api.github.com/users/ksooo","html_url":"https://github.com/ksooo","followers_url":"https://api.github.com/users/ksooo/followers","following_url":"https://api.github.com/users/ksooo/following{/other_user}","gists_url":"https://api.github.com/users/ksooo/gists{/gist_id}","starred_url":"https://api.github.com/users/ksooo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksooo/subscriptions","organizations_url":"https://api.github.com/users/ksooo/orgs","repos_url":"https://api.github.com/users/ksooo/repos","events_url":"https://api.github.com/users/ksooo/events{/privacy}","received_events_url":"https://api.github.com/users/ksooo/received_events","type":"User","site_admin":false},"created_at":"2018-10-02T06:04:11Z","updated_at":"2018-10-02T06:04:11Z","author_association":"MEMBER","body":"Note: As this is a non-breaking API change it's okay to include it for Leia."}}
{"actor":{"display_login":"ksooo"}}