diff --git a/CONTRIBUTORS b/CONTRIBUTORS index c853bd1c..6ae3a383 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2667,6 +2667,7 @@ Stephan Austerm Lars Hanisch for suggesting to assign the source character 'V' to "Analog Video" for a patch that was used to implement SCR (Satellite Channel Routing) + for implementing the SVDRP command 'UPDR' Alex Lasnier for adding tuning support for ATSC devices diff --git a/HISTORY b/HISTORY index 655d57e3..a0f71954 100644 --- a/HISTORY +++ b/HISTORY @@ -6771,3 +6771,5 @@ Video Disk Recorder Revision History set up their sat devices with the above options. - Fixed a crash when deleting a recording while cutting it (thanks to Ville Skyttä). - Fixed several spelling errors (thanks to Ville Skyttä). +- The new SVDRP command UPDR can be used to trigger an update of the list of + recordings (thanks to Lars Hanisch). diff --git a/recording.c b/recording.c index bea7eb6b..6b11fbd3 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.c 2.38 2011/09/04 09:32:25 kls Exp $ + * $Id: recording.c 2.39 2011/12/04 13:51:44 kls Exp $ */ #include "recording.h" @@ -1162,7 +1162,7 @@ void cRecordings::TouchUpdate(void) bool needsUpdate = NeedsUpdate(); TouchFile(UpdateFileName()); if (!needsUpdate) - lastUpdate = time(NULL); // make sure we don't tigger ourselves + lastUpdate = time(NULL); // make sure we don't trigger ourselves } bool cRecordings::NeedsUpdate(void) diff --git a/svdrp.c b/svdrp.c index bdd8cc84..b333202b 100644 --- a/svdrp.c +++ b/svdrp.c @@ -10,7 +10,7 @@ * and interact with the Video Disk Recorder - or write a full featured * graphical interface that sits on top of an SVDRP connection. * - * $Id: svdrp.c 2.11 2011/09/11 14:47:22 kls Exp $ + * $Id: svdrp.c 2.12 2011/12/04 13:58:33 kls Exp $ */ #include "svdrp.h" @@ -315,6 +315,9 @@ const char *HelpPages[] = { " Updates a timer. Settings must be in the same format as returned\n" " by the LSTT command. If a timer with the same channel, day, start\n" " and stop time does not yet exists, it will be created.", + "UPDR\n" + " Initiates a re-read of the recordings directory, which is the SVDRP\n" + " equivalent to 'touch .update'.", "VOLU [ | + | - | mute ]\n" " Set the audio volume to the given number (which is limited to the range\n" " 0...255). If the special options '+' or '-' are given, the volume will\n" @@ -1559,6 +1562,12 @@ void cSVDRP::CmdUPDT(const char *Option) Reply(501, "Missing timer settings"); } +void cSVDRP::CmdUPDR(const char *Option) +{ + Recordings.Update(false); + Reply(250, "Re-read of recordings directory triggered"); +} + void cSVDRP::CmdVOLU(const char *Option) { if (*Option) { @@ -1629,6 +1638,7 @@ void cSVDRP::Execute(char *Cmd) else if (CMD("REMO")) CmdREMO(s); else if (CMD("SCAN")) CmdSCAN(s); else if (CMD("STAT")) CmdSTAT(s); + else if (CMD("UPDR")) CmdUPDR(s); else if (CMD("UPDT")) CmdUPDT(s); else if (CMD("VOLU")) CmdVOLU(s); else if (CMD("QUIT")) Close(true); diff --git a/svdrp.h b/svdrp.h index deee42ca..a4cdee68 100644 --- a/svdrp.h +++ b/svdrp.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: svdrp.h 1.29 2007/04/30 12:28:28 kls Exp $ + * $Id: svdrp.h 2.1 2011/12/04 13:51:44 kls Exp $ */ #ifndef __SVDRP_H @@ -82,6 +82,7 @@ private: void CmdSCAN(const char *Option); void CmdSTAT(const char *Option); void CmdUPDT(const char *Option); + void CmdUPDR(const char *Option); void CmdVOLU(const char *Option); void Execute(char *Cmd); public: