I believe we all want the PVR API changes to be merged as soon as possible (i.e. once Isenguard is branched).
Tweaks to Kodi's PVR core which don't affect the API can be worked on later. Skin issues can be worked on later.
Changes to the detail for particular Addons that don't require API changes can be worked on later.
The immediate objective is therefore to freeze an API which supports the desired new features,
with sufficient flexibility so addon maintainers can start implementing without needing further API changes.
To be sure PR7079 is ready, I suggest we ask the following questions:
Q: What are the 'legacy' features we want to keep & why?
A1: Standard 'Timer' based recordings (this channel, at this time, for this long) - All backends do this. Backwards compatabiltiy.
A2: Repeating 'Timer' based recordings (this channel, at this time, for this long, on these days) - Fallback. Doesn't need a good EPG.
A3: Timeshift
Q: What are the desired new features & why?
A1: EPG Based Once recording (Find and record 'the optimum' upcoming showing of the selected episode)
A2: EPG Based Series recording (Find and record all distinct episodes of this show, using 'optimum' settings)
A3: EPG Based 'Advanced Search' recording (e.g. Find and record all films with 'Carry Grant' in them or 'Terminator' in the title)
A4: A means to adjust 'back end specific' settings (avoiding attribute mapping issues with different backends)
Q: What API changes do we need to support these new desired features?
A1: A means to determine if a PVR client supports the new timer types
A2: A means to instruct a PVR client to add a new timer of the requested type
A3: A means to know when EPG timers will actually record, including conflicts and metadata.
A4: A means to edit both 'legacy' and EPG based timers after creation
A5: A means to edit 'back end specific' timer settings after timer creation
This assumes the following responsibilities:
Kodi PVR core:
KK1: Presentation of Timers and associated metadata.
KK2: Requesting New Timers. Deleting Timers. Activating/Deactivating (manging conflicts).
KK3: Editing Timers.
KK4: Definition of 'essential timer settings' and presentable timer metadata.
KK5: Definition of supportable 'Timer Types'?
PVR Clients:
PC1: Translation of New & Delete Timer requests into 'backend speak' for each supported 'timer type'.
PC2: Translation of upcoming recordings and associated timers into 'Kodi speak'.
PC3: Translation of 'essential timer settings' between 'kodi speak' and 'backend speak'.
PC4: Formatting back-end specific settings / options for kodi-core to present to the user for editing
PC5: Translating 'backend speak' timer metadata into 'kodi speak'.
Back-End:
BE1: Converting timers into upcoming recordings using the settings requested by the PVR client.
BE2: Informing the PVR client of upcoming recordings and timer metadata.
To give some context to these comments, I'm a long term mythtv user who just played with Ksooo's latest tvheadend prototype and 'skimmed' the code. I plan to look at specifics in detail in the next few days and to make separate comments, but am sure there are others with a much better grip on the proposed API (and CPP in general) than I have. Given this and the 'urgency' it is probably better to ask the question and see what others think.
My questions are:
- Do others agree with my stated objectives for the API?
- Are there any 'missing' API features critical enough delay merge?
- Are there any bits of the API which could be simplified/made more flexible?
I can only apologize ksooo, I would much rather have posted this at 13:45 on 2015-05-15.