TV/Timers: Manual Recording allows End Date/Time before Start Date/Time
#1
While setting up a Timer for a One time (manual) Recording, if I set the Start Date to some date in the future (e.g., Sunday, January 10, 2021), the End Date never updates automatically to match the Start Date.  The End Date continues to show the current date (e.g., Thursday, January 7, 2021).  And if I click OK to save the entry, it saves the entry exactly as entered -- with an End Date set to occur before the Start Date.  But then, after several minutes Kodi apparently realizes that an invalid Timer entry was saved.  So Kodi just silently (without any warning or error message) goes ahead and deletes the invalid entry.  However the user is never given any notice of the deletion, or warned that the deletion was due to an invalid entry -- i.e., the End Date being before the Start Date.

Ideally, I'd like to see Kodi automatically adjust the End Date (as the user is creating the entry) to whatever future date is being entered as a Start Date.  But if that's not possible or easily implemented, then alternatively I think Kodi should display an error message to the user while the entry is being created, and refuse to save the invalid Timer entry.

For reference, I'm using Kodi version Build 19.0-BETA2 (18.9.821) Git: 20201207-8cc9e80e41, with NextPVR version 50009, on Windows 10 Pro 1909.

I'm not sure if this would be considered a bug report or a feature request (or maybe a combination of both).  In any case, I wanted to at least make the observation, and post it here for comments.
Reply
#2
I am pretty sure that this is a Kodi core change to change manual recordings to have a fixed duration like instant recordings and not allow invalid ranges.   Any assumptions I make in the addon to correct this could be wrong.

You can do this via the NextPVR interface and Kodi will accept them.

Ideally you should be using an EPG to get the full benefits of a PVR.

Martin
Reply
#3
Not withstanding the UI could be a bit cleverer @emveepee, what if the add-on returns an error when trying to create the timer? Does the user get the correct feedback then?

Alternatively the add-on could set a default end-time if it's invalid.
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#4
@phunkyfish I couldn't duplicate the Kodi issue that the users was talking about, a one off recording in the future does actually get created with a negative duration and I don't see Kodi removing it until perhaps when the recording starts.  What I plan on doing is asking @sub3 to see if he can handle a negative duration and treat the time as a future time or return an error.

My philosophy is the addon doesn't try to be smarter then the backend or core and it should create the recording that the user requests.  Now the user still has the option to modify the timer if the notice it is bogus.

Martin
Reply
#5
I don't see the difference between the backend detecting an error or the add-ons doing it to be honest. With vuplus most of the logic is in the add-on as the backend is just not capable of being extended easily. But I guess if you can move that to the server you might as well.
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#6
The difference I see is if the users sets up a recording it is probably easier to edit it with a proper end time after the entry then it is to figure out this response.   There is no way back to timer dialog after OK.  I will consider a toast message if @sub3 can't implement something.

Image

Martin
Reply
#7
I thought about overnight and I realized I didn't have to make any assumption, I can give users a second chance to submit a correct duration.  A PR has been created for a future build.

Martin
Reply
#8
(2021-01-08, 21:58)emveepee Wrote: @phunkyfish I couldn't duplicate the Kodi issue that the users was talking about, a one off recording in the future does actually get created with a negative duration and I don't see Kodi removing it until perhaps when the recording starts.  What I plan on doing is asking @sub3 to see if he can handle a negative duration and treat the time as a future time or return an error.

I just tested for this issue again; this time with Debug Logging enabled.  The problem is reproducible -- at least on my particular system.  What I did was deliberately (this time) create a TV/Timer entry with a Start Date a couple days ahead (Monday, January 11), and purposely left the End Date at today (Saturday, January 9).  I confirmed that the entry got created and appeared in the list; and that it showed the Start Date and End Date as entered -- Jan. 11 and Jan. 9 respectively.  The system time at that point was 7:12 PM.  Then, I just sat and watched the list of TV/Timer entries as Kodi sat idle.  No recordings were active.  After waiting approximately 9 minutes (at 7:21 PM), the invalid entry just silently disappeared from the list -- with no apparent warning or error.  The only clue that something changed was a momentary beep that I heard from Kodi.  But right after that, I noticed that the invalid entry was gone.

As mentioned earlier, I'm using Kodi version Build 19.0-BETA2 (18.9.821) Git: 20201207-8cc9e80e41, with NextPVR version 50009, on Windows 10 Pro 1909.  Here's the Debug Log from this most recent test: https://paste.kodi.tv/lojotavuka.kodi

Let me know if I can provide any other info or details about this.
Reply
#9
Did it really get deleted or does it simply show up in Failed Recordings set by the backend?   I don't see requests from Kodi to remove it from the backend.

If you aren't going to be populating an EPG it would be better if you marked all your channels as None on the backend.  Then the addon won't need to poll the backend when Kodi asks for new data.  You can also reduce those calls via advanced settings.

Martin
Reply
#10
(2021-01-10, 18:53)emveepee Wrote: Did it really get deleted or does it simply show up in Failed Recordings set by the backend?   I don't see requests from Kodi to remove it from the backend.

If you aren't going to be populating an EPG it would be better if you marked all your channels as None on the backend.  Then the addon won't need to poll the backend when Kodi asks for new data.  You can also reduce those calls via advanced settings.

Martin

You're correct.  When I check in Failed Recordings, I found that the invalid Timer entries got moved there.  From a practical standpoint though, to the user it still means the Timer entry effectively got deleted.  But I also noticed in the Debug Log that a Warning got logged at 7:12 PM:
Quote:2021-01-09 19:12:50.672 T:2120  WARNING <general>: Timer settings dialog: Specified recording end time < start time: expect errors!
So if the software is able to detect and log the fact that the 'end time < start time', wouldn't it be fairly straightforward to display the same info to the user in real-time at the point where the Timer entry is being saved in the first place?

Also, here's another question.  Since the entry was saved at 7:12 PM, why did it take 9 minutes (until 7:21 PM) for the software to decide that the entry should be moved into Failed Recordings?  Why the long delay in taking that action?  If the entry had been moved immediately, then the user would at least see that the invalid entry wasn't in the list of scheduled recordings -- and it would be apparent up front that there was something wrong with the entry.  Most users aren't going to wait around for 9 minutes to see if any of their new Timer entries got deleted or moved.
Reply
#11
First I will be withdrawing my PR since @phunkyfish and @ksooo are working on it in core which I posted in my first response seems like the appropriate solution as it is not really a pvr.nextpvr specific issue.

As for why NextPVR didn't return an immediate error it is not clear why you got the Failed recording and I did not.  You didn't send the NextPVR logs that would explain this better .  Realistically very few users run NextPVR with no guide, and do their scheduling in Kodi and also make the user error on entry.  I did ask @sub3 to look into returning an error for immediate feedback in Leia and in Matrix. 

Since this issue has been around since 2012 and this is the first report I've seen I don't see either the core change or the backend change as immediate concerns and I expect the other developers involved will work on it with appropriate priority.

Martin
Reply
#12
(2021-01-11, 02:40)emveepee Wrote: As for why NextPVR didn't return an immediate error it is not clear why you got the Failed recording and I did not.  You didn't send the NextPVR logs that would explain this better.

It may or may not matter at this point; since it doesn't seem this particular issue is being considered much of a priority; but for my own reference, is there a document or posting or wiki somewhere that explains how to go about generating the NextPVR logs that you mentioned?  If you could provide a link to such info that would be most helpful -- at least for any future issues I might come across.
Reply
#13
I'm not sure why you feel that way since several people are actively looking into this, they key is not to rush a solution.

As for logs when you installed NextPVR you may have missed the NextPVR wiki https://github.com/sub3/NextPVR/wiki/get-help  Backend support and questions are on the NextPVR forum where  you can post these logs.

Martin
Reply



Logout Mark Read Team Forum Stats Members Help
TV/Timers: Manual Recording allows End Date/Time before Start Date/Time0
This forum uses Lukasz Tkacz MyBB addons.