-
Notifications
You must be signed in to change notification settings - Fork 9
Timers and Timer Rules
This page makes an attempt at explaining how this PVR Client deals with the differences between the HDHomeRun DVR service's concept of Recording Rules and Kodi's concept of Timers.
The HDHomeRun DVR Service provides DVR functionality via a mechanism called Recording Rules. There are two basic types of Recording Rules:
- Series Rules - Flag a specific series to be recorded
- Date/Time Only Rules - Flag an individual episode of a series to be recorded
All DVR Service Recording Rules must be associated with a specific series; there is no means to schedule a recording based on just a date and time (Kodi: Manual Timer). This requirement limits how Recording Rules can be added, a front end application like Kodi must be able to match all Recording Rule requests to a specific series.
The DVR Service is able to provide information about an individual series, up to 2 weeks into the future, that lists all episodes of the series that will be aired and flags which episodes match an existing Recording Rule. The DVR Service does not, however, normalize those flags against the rules that will be applied by the HDHomeRun RECORD storage engine. As an example if the RECORD engine has already recorded an episode of a series by default it will not record it again. There is currently no way for a client application like Kodi to discern what the RECORD engine actually intends to do. This limitation is frustrating as the front end can only report on episodes that might be recorded.
This PVR Client exposes existing DVR Service Recording Rules as Kodi Timer Rules. There are two types of Timer Rules:
- Record Series Rule - Timer Rule based on a DVR Service Series Rule
- Record Once Rule - Timer Rule based on a DVR Service Date/Time Only Rule
Record Series Rules are editable; you can set a specific channel, set if only new or recent episodes should record, and apply start and end padding time to each recording. You can also delete Record Series Rules.
Record Once Rules cannot be edited or directly deleted, they can only be viewed. To remove a Record Once rule, the scheduled episode must be deleted instead. This limitation is partially due to how Kodi handles Timer Rules in that there is no means to display a date/time selector but also due to the DVR service requirement that a series be associated with all Recording Rules -- even if Kodi allowed the date/time selector there would still need to be a way to associate the updated date/time with a series.
This PVR Client exposes the individual episodes associated with a Recording Rule as Kodi Timers. Individual Timers cannot be edited, but Record Once Episode (Date/Time Only) timers can be deleted -- the associated Record Once Rule will be deleted instead.
Kodi timers have to be converted into HDHomeRun DVR service Recording Rules. Not all the Kodi timer types can be implemented, specifically there is no concept of a "Manual Timer" in the HDHomeRun DVR service -- all Recording Rules require a series to operate against; you cannot add a Recording Rule based on just a date/time and a channel number.
When adding a timer through Kodi, the timer is mapped to either a Series Rule or a Date/Time Only Rule on the backend, and then subsequently mapped into a Kodi Timer Rule after it has been created. Upon creation, the episode information for the associated series will be downloaded and added to the Electronic Program Guide (EPG) in order to display contextual information (see above). The How-To section of this wiki does a decent job of explaining how to add Timer Rules and Timers in Kodi.
When a "one shot" Timer is added through Kodi, typically as a result of right-clicking on an EPG entry, a new Date/Time Only Recording Rule is added to the backend, and will be mapped as a "Record Once Rule". When a "repeating" Timer is added through Kodi, a new Series Recording Rule is added to the backend and will be mapped as a "Record Series Rule".
This PVR Client takes advantage of the HDHomeRun DVR service's ability to indicate a specific channel on which to record, applying additional start and end padding to the recording time(s) and indicating that only new or "recent" (current season?) episodes should be recorded if the request will be mapped to a Series Recording Rule.
Copyright (C) 2016-2022 Michael G. Brehm
Source code is licensed under the MIT LICENSE
This project is neither affiliated with nor sponsored by SiliconDust USA Inc. or XBMC Foundation.
All product names, logos, screenshots, and brands are property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.