New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PVR] Series recordings #7079
[PVR] Series recordings #7079
Conversation
I can't comment on the PVR stuff since I don't use it. |
@Montellese As far as I can see, CGUIDialogSelect always works on a FileItemList. Weekdays are just an int. I don't see that CGUIDialogSelect fits here. Or is it a good approach to "wrap" the single weekdays to file items? |
#. Label of pre-record spinner | ||
#: xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp | ||
msgctxt "#813" | ||
msgid "Pre-record (minutes):" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@Montellese already proposed a few time, but my offer to provide you needed equipment for PVR is still valid. PVR is becoming better and better and more and more used and will be in the future and the API is not really following :( |
Now my eyes hurt... |
@Jalle19 hehe. Need some glasses? Many thanks for the review. Nothing serious found so far, which makes me feel good... Despite from the code comments, any feedback on the functionality? |
I'm not sure if it wouldn't be better to split up the type so that "guide based" would have it's own flag. |
|
||
CDateTime now(CDateTime::GetCurrentDateTime()); | ||
CDateTime startLocalTime = m_bAnytime ? now : m_timerInfoTag->StartAsLocalTime(); | ||
CDateTime endLocalTime = m_bAnytime ? now : m_timerInfoTag->EndAsLocalTime(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
;-) Feel free to send me a patch to add the setting. I know you have the skills for that. |
Will see when I can find some time. Nice work btw ;-) |
Thanks for taking care of the comments so far! |
@Montellese would it be possible to put the timer settings in logical groups with the changes by alwinus that allow to define a group label? It might be a nice idea to clean up this dialog even more by having logical groups. Like one section for type, channel etc, the other for advanced schedule options, and one for secondary settings like "priority", "lifetime", ... @ksooo I always wondered who is responsible for the available "lifetime" values, Kodi or backends? I also think this shouldn't be a spinner with the range from 1-356 days but rather a predefined list of values that make most sense + a "forever" and a "until disk space is required" option, like: edit: thanks for addressing all the bikeshed so far 👍 |
@da-anda may I kindly ask to hold yer horses a little, please. I very appreciate all your ideas, but I get the feeling that there is so many room for small improvements everywhere that I will still work on this PR when we are in Beta phase for Kodi 20. ;-) I try my best, but having limited time. I opt for getting this out very soon and to improve over time. The change requests are at a very high level already which makes me think the important things are already in good shape. Regarding lifetime: Can only speak for tvheadend. There, it is the backend which can handle every lifetime from 0 to ... days. "forever" and "until disk space is required" is not supported. At least with those last two values things will get complicated. How to determine which (kind of values) the backend supports? From the API point of view ... a mess. We have carefully to weight value against effort. |
@ksooo - sorry for getting crazy about features/changes. The things mentioned in my previous post are ofc only nice to haves and can also be addressed later. Don't want to bikeshed this PR to death, only got inspired by the improvements done so far. Regarding lifetime API, well, not that complicated I think. Ask the PVR add-on for supported lifetime types and get a vector (or bitmask) back (PVR_TIMER_LIFETIME_DAYS, PVR_TIMER_LIFETIME_INFINITE, PVR_TIMER_LIFETIME_DISKUSAGE). The other option would be to register a settings value filler and within the filler optain the possible values from the PVR add-on (have the add-on fill the list). We could even support both ways, where with support for PVR_TIMER_LIFETIME_DAYS we use a predefined list like in my suggestion above and if backend wants to have custom settings have it fill the options on it's own. As said, not required for this PR in general, only a nice to have and can also be addressed later. |
@da-anda re lifetime. Your implementation suggestion is exactly what I'm saying. It bloats the PVR addon API (remember, every addon must implement it) for IMO not (too) much value gain. IMO, this goes far beyond the scope of this PR. Especially, as this "addons should be able to specify the values they support for their supported attributes" can be applied to almost(?) all(?) timer type attributes... |
@ksoo - I actually thought that when you mentioned the rewrite of the other PR that you're going the way that add-ons "simply" forward a timer settings structure and we're only the rendering GUI ;) I don't see this as bloat of the API, but the way our API is handled is unfortunately causing additional bloat. So the real issue is the lack of Kodi not being able to talk to older API versions, which i know will make things even more complicated core wise, but this logic could probably be abstracted and reused for all (binary) interfaces. No more stub functions and PVR add-on breakage or update nightmare because of a minor API bump. But I can't judge the amount of work and complexity required for this, especially with binary stuff. I really apreciate what you've done here and look forward to see this PR in action. |
Yes, that's exactly the way I want to go. And this PR is the first step into this direction. 100% is still somehow far away, but with this PR we will have the basics. Looking at it with 80/20 rule in mind we're at 80 now, imo. |
40108e0
to
814ab28
Compare
All feedback from yesterday and today is now in.
Thanks to all reviewers so far. Would really like to get some feedback re. PVR addon API changes. @opdenkamp? @FernetMenta? @xhaggi? all? |
#. Representation of PVR timer state "disabled" | ||
#: xbmc/pvr/timers/PVRTimerInfoTag.cpp | ||
msgctxt "#825" | ||
msgid "Disabled" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@ksooo this seem to have broken instant recordings for backends not supporting those timer types: EDIT: not sure about this message, why does it trigger a warning?
|
@FernetMenta could you please check what happens in |
@ksooo , @FernetMenta - this doesn't appear to affect pvr.mythtv with only the 1.9.7/2.0.0, 2.0.1 and 3.0.0 'minimal support' patches applied. |
Can confirm that there are no issues with tvheadend. |
I can confirm that pvr.wmc Instant Record is working with current kodi master and pvr.wmc master (ie the 1.9.7 minimal support patches) |
also just to clarify, the users in that forum thread are running Kodi 15.1 but this change on this PR was only merged into Jarvis (Kodi 16 alpha) unless im missing something? |
This is PR is Jarvis only. So, if the forum thread is about 15.1 there must be some other reason for the problem. |
looks like the OP on the forum thread was running Kodi 16, the 2nd guy in the thread with the "same problem" is on 15.1 which confused me |
After reading the forum thread again, it actually is about Jarvis. Nevertheless, I think that this is most probably a problem with pvr.vdr.vnsi, not with Kodi core. |
@ksooo see my comment, this change broke it because of incorrect timer state for instant recordings |
@FernetMenta okay, it's a change and obviously it broke vdr.vnsi. I was not aware of that this could break anything. Sorry. But isn't state SCHEDULED wrong, according to the API docs (https://github.com/xbmc/xbmc/blob/Isengard/xbmc/addons/include/xbmc_pvr_types.h#L109)? SCHEDULED indicates that "timer is scheduled for recording" and as long as the backend has not confirmed that it successfully added a newly kodi-side created timer (AddTimer succeeded), the timer state should be NEW ("a new, unsaved timer"), imo. So, I suggest to fix vdr.vnsi. What do you think? |
vdr allows to create a timer which is not active. So what do you suggest?
This ping pong makes not much sense to me. |
Also note that PVR_TIMER_STATE_NEW was used to be never set from kodi. Your change may have broken more behaviour. |
So the question is whether we consider the API spec broken and fix it or whether we consider some API implemenations broken because they violate the spec? |
Why can't you just instruct vdr to create an active timer in this case (assuming that this is what you currently do if incoming state is SCHEDULED)? |
why do you want to change the api? note that vdr/vnsi was the first pvr addon and many things of the API has beed derived from this. |
how can the first addon with that the spec was created violate the spec? |
I see. But then the API docs for state NEW should definitely be revised. I read it as "just created on the Kodi side, not yet confirmed by the backend". I will create a PR fixing both the misleading API docs and reverting the "misuse" (;-) of timer state new. |
thanks much! |
@FernetMenta anything which would affect this metaron-uk@a131127 in #7626 ? |
yes, lifetime goes untouched through vnsi and the definition is:
|
@ksooo do you have plans to support vps timers? would this be a special type or just some flag? |
I think a special timer type would be the easiest way to implement this. Only difference to "normal" timers would be that start and end time are not fixed values, but approximated, right? Naming the timer respectively would make things easily understandable for the users. Nothing additionally needed in Kodi core for this. All that is necessary can be done in the PVR add-ons - given that the vps functionality is something provided and controlled by the backend. |
This PR adds series recording support to Kodi.
The technical concept:
Basic concept is that PVR addons now define an arbitrary number of timer types they support, each type defining its own combination of timer type attributes (out of a set of attributes predefined by the PVR addon API).
Kodi PVR core picks up the different types (and their attributes) using a new PVR addon API function and strictly builds up the complete timer-related logic dynamically, according to the timer attributes. Timer type information is now available at every TimerInfoTag instance.
Essential timer attributes: Kodi distinguishes between manual (time-based) and epg-based timers. Also, there can be one-shot and repeating timers. All combinations of these attributes are allowed, e.g. "manual + one-shot" or "epg + repeating".
Examples for other timer attributes: "supports recording priority", "supports epg search string", "supports recording folders", ...
UI changes:
Timer window:
Timer settings dialog:
Context menu actions:
Note: All this is implemented and tested against a real PVR addon (pvr.hts), not "just" pvr.demo. I consider pvr.hts as the reference implementation of this (larger) PVR addon API change. Code is currently here (https://github.com/ksooo/pvr.hts/tree/series-recording-support), PR will follow soon.
Feedback is much appreciated!