summaryrefslogtreecommitdiff
path: root/svdrp.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-09-02 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-09-02 18:00:00 +0200
commitbb18b9e0b449afff418f010c1b2e255acd3fbad3 (patch)
tree0c7d94f019a386ae0cc1ca8a3b6e669e68353dff /svdrp.c
parentae8fe25312b6b0ec18fd0c6c2a275f334ada02db (diff)
downloadvdr-patch-lnbsharing-bb18b9e0b449afff418f010c1b2e255acd3fbad3.tar.gz
vdr-patch-lnbsharing-bb18b9e0b449afff418f010c1b2e255acd3fbad3.tar.bz2
Version 0.94vdr-0.94
- Implemented automatic shutdown (see INSTALL and MANUAL for details). - New SVDRP command NEXT to show the next timer event. - The new remote control key "Power" can be used to turn the VDR machine off (this requires the presence of the '-s' option). - Fixed code for the default "Ok" button on the PC keyboard (was 0x162 on the "good old" keyboards (with the F-keys at the left side), while it changed to 0x15E on the newer keyboards). - When a recording is edited, the summary information (if present) is now also copied. - When a recording is running on the primary interface, any attempt to change the current channel will now lead to a "Channel locked" message. - The main program loop now first checks whether any timer recordings are finished, before starting a new timer recording. This is important in case one timer ends at the same time another timer starts. - New setup parameter OSDMessageTime to define how long an OSD message shall be displayed. - The "File" parameter of a timer can now contain the '~' character to store the recording in a hierarchical directory structure. The '~' character has been chosen since the file system's directory delimiter '/' may be part of a regular programme name (showing the directory hierarchy in the "Recordings" menu will follow later). - Repeating timers now create recordings that contain the 'Subtitle' information from the EPG data in their file name. Typically (on tv stations that care about their viewers) this contains the episode title of a series. The subtitle is appended to the timer's file name, separated by a '~' character, so that it results in all recordings of this timer being collected in a common subdirectory. You can disable this with the 'UseSubtitle' parameter in the "Setup" menu. - The summary information is now taken from the EPG data at the actual time of recording (no longer at the time the timer is created in the "Schedule" menu). If a timer already has summary data, that data will be used. If you have repeating timers in your 'timers.conf', you may want to make sure they do NOT contain any summary information (that's the last field in the timer definitions). Use your favourite text editor to delete that information. That way every recording will store the actual summary data at the time of the recording.
Diffstat (limited to 'svdrp.c')
-rw-r--r--svdrp.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/svdrp.c b/svdrp.c
index d3bceec..5f8aad4 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 1.21 2001/08/12 15:10:16 kls Exp $
+ * $Id: svdrp.c 1.22 2001/09/01 09:50:03 kls Exp $
*/
#define _GNU_SOURCE
@@ -166,6 +166,16 @@ const char *HelpPages[] = {
" Create a new timer. Settings must be in the same format as returned\n"
" by the LSTT command. It is an error if a timer with the same channel,\n"
" day, start and stop time already exists.",
+ "NEXT [ abs | rel ]\n"
+ " Show the next timer event. If no option is given, the output will be\n"
+ " in human readable form. With option 'abs' the absolute time of the next\n"
+ " event will be given as the number of seconds since the epoch (time_t\n"
+ " format), while with option 'rel' the relative time will be given as the\n"
+ " number of seconds from now until the event. If the absolute time given\n"
+ " is smaller than the current time, or if the relative time is less than\n"
+ " zero, this means that the timer is currently recording and has started\n"
+ " at the given time. The first value in the resulting line is the number\n"
+ " of the timer.",
"OVLF <sizex> <sizey> <fbaddr> <bpp> <palette>\n"
" Set the size, address depth and palette of the overlay.",
"OVLG <sizex> <sizey> <posx> <posy>\n"
@@ -737,6 +747,28 @@ void cSVDRP::CmdNEWT(const char *Option)
Reply(501, "Missing timer settings");
}
+void cSVDRP::CmdNEXT(const char *Option)
+{
+ cTimer *t = Timers.GetNextActiveTimer();
+ if (t) {
+ time_t Start = t->StartTime();
+ int Number = t->Index() + 1;
+ if (!*Option) {
+ char *s = ctime(&Start);
+ s[strlen(s) - 1] = 0; // strip trailing newline
+ Reply(250, "%d %s", Number, s);
+ }
+ else if (strcasecmp(Option, "ABS") == 0)
+ Reply(250, "%d %ld", Number, Start);
+ else if (strcasecmp(Option, "REL") == 0)
+ Reply(250, "%d %ld", Number, Start - time(NULL));
+ else
+ Reply(501, "Unknown option: \"%s\"", Option);
+ }
+ else
+ Reply(550, "No active timers");
+}
+
void cSVDRP::CmdOVLF(const char *Option)
{
if (*Option) {
@@ -893,6 +925,7 @@ void cSVDRP::Execute(char *Cmd)
else if (CMD("MOVT")) CmdMOVT(s);
else if (CMD("NEWC")) CmdNEWC(s);
else if (CMD("NEWT")) CmdNEWT(s);
+ else if (CMD("NEXT")) CmdNEXT(s);
else if (CMD("OVLF")) CmdOVLF(s);
else if (CMD("OVLG")) CmdOVLG(s);
else if (CMD("OVLC")) CmdOVLC(s);