[vdr] [vdr bug]Shutdown during an active timer is broken

Thiemo rollercoaster at reel-multimedia.com
Mon Dec 11 16:47:35 CET 2006


Am Samstag, 9. Dezember 2006 17:48 schrieb Udo Richter:
> Thiemo wrote:
> > So here is my solution:
> > - if a recording is running and User presses "Power" tell him the box
> > will shutdown after the current recording
> > - If he presses "Power" a second time, ask if he realy wants to do this
> > (like before) *and* stop any running recordings (i reused the code from
> > Udo which work very well, thanks)
>
> I agree that the shutdown-not-confirmed state should be more visible to
> users by some message that VDR is just waiting for background tasks to
> complete before shutdown. A solution I thought of was to put up a
> message after not confirming shutdown that VDR will shut down as soon as
> whatever is done - maybe even keeping that message on screen all the time.
>
> The idea of pressing power button twice is also nice, though it will
> confuse scripts that send power key presses.
No it won't. VDR still remembers the "shutdown-after-recording"-state with my 
changes. The only difference here is that the user is told whats going on.

A script never knows if it has to confirm the kPower or not (except if you 
would parse the timers to see if one is running). So if a script wants to 
shutdown vdr regardless of its state (i.e. for some maintenance ;) ) then 
sending kPower via svdrp isn't the right action at all. (one should use 
"killall -1 vdr" or similar and prevent vdr from starting up again).

> Plus, effectively, while 
> you currently confirm shutdown with "power, ok", you now confirm with
> "power, power". And together with the other numerous reasons for not
> shutting down, this gets confusing: Use power button to override running
> timers, and use ok button to override timers in a few minutes?
No, you still confirm with Ok, theres just one additional step before.
I suggest you try it out - thats easier than describing it here.

> > - if a timer is pending within MinEventTimeout ask if he really wants to
> > do so but do *not* modify any timers or wakeup times.
>
> So you *do* want running timers to be disabled, but *not* want to ignore
> timers in a few minutes?
exactly.
If you would alter a timer (or the wakeuptime whats the same in the end) you 
would have to give a clear warning "Your timers will be shifted by xx 
minutes. Are you sure".
But as i wrote in the previous post, it's not a good idea to alter a timer at 
all.

> > I think it's the task of whoever adopts vdr to a mainboard or box to
> > program a valid wakeup time, not the vdr itself.
>
> Then we can also go back to what it was before, leave all timers alone
> and report wakeup in -30 minutes to the shutdown script. In the end it
> doesn't matter if any timers are running when VDR is killed.
No, it's an improvement to what is was before. Users treat negative times as 
bugs. (And it *is* a bug to ask "recording in -x min" instead of "a recording 
is active")

Tim



More information about the vdr mailing list