diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2006-01-15 18:00:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2006-01-15 18:00:00 +0100 |
commit | 78e3da813cb4345e57934a9a60f6316f1e257307 (patch) | |
tree | 2ce53c2872dd7451c0647ad50fe81306ad985bc0 /svdrp.c | |
parent | da948a50d2318fd9c818a4b969b74555ce577b1e (diff) | |
download | vdr-patch-lnbsharing-78e3da813cb4345e57934a9a60f6316f1e257307.tar.gz vdr-patch-lnbsharing-78e3da813cb4345e57934a9a60f6316f1e257307.tar.bz2 |
Version 1.3.39vdr-1.3.39
- The SVDRP command LSTT now accepts the new option 'id' to have the channels
of the timers listed with their unique channel ids instead of their numbers
(suggested by Matthias Schniedermeyer).
- Added a missing #include <linux/unistd.h> to thread.c (thanks to Ville Skyttä).
- Fixed the "plugins-clean" and "plugins-install" targets in the Makefile (thanks
to Andreas Brachold).
- Fixed handling "more than 3 byte" key sequences in cKbdRemote::ReadKeySequence()
(thanks to Peter Bieringer). If you are using the PC keyboard as remote control
input you may need to make VDR newly learn the keys by removing the remote.conf
file.
- To avoid problems with access rights when VDR shall run as 'root' it now skips
all SetCaps() and SetUser() calls when it is started as 'root' and "-u root"
is given.
- Added missing i18n entry for the "Timer" button (thanks to Ville Skyttä)
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
- Making the "Menu" key behave consistently has not been well received by several
users, so the new option "Setup/OSD/Menu button closes" can be used to get the
old behavior back (which also is the default value of this option).
- Dropped the default vdr user. The program now always runs under the user id
it was started from, unless the '-u' option is given and it was started from
the 'root' user. If you want to have a default vdr user, you can activate and
adjust the "VDR_USER = vdr" line in your Make.config file (from the original
patch by Ludwig Nussel).
- Key macros can now be defined for all non-modeless keys (suggested by Mirko Dölle).
- Adjusted the "KEY MACROS" section of vdr.5 to the new plugin calling mechanism
introduced in version 1.3.32.
- Removed the now obsolete "ca.conf" section from vdr.1 (thanks to Ville Skyttä).
- Added missing description of L and R circular polarization to 'diseqc.conf'.
- Added a note about "modprobe capability" to INSTALL (suggested by Patrick Cernko).
- Fixed canonicalizing the file name in the SVDRP command GRAB to allow full path
names (thanks to Stefan Huelswitt).
- Added a missing '-' to the example for viewing a grabbed image on a remote host
(reported by Philippe Gramoullé).
- Made the "What's on now/next?" menus a lot faster by storing a pointer to each
channel's schedule in the cChannel data.
- Made the log messages regarding lost lock of devices "info" instead of "error"
(suggested by Andreas Brachold).
- The SVDRP command GRAB allows file names without extension again (suggested by
Stefan Huelswitt).
- Pressing '0' in the "Schedule" menu now rotates through displaying "This event on
this channel", "This event on all channels" and "All events on all channels".
This can be used to find reruns of a given show, or the episodes of a series.
Note that if there are many channels in your channels.conf, displaying the
"All events on all channels" page may take a while.
- The status markers in the "Schedule" menu are now only updated if a submenu is
closed in which a timer has been modified, which speeds up closing submenus.
- Now only writing Dolby Digital tracks into the 'info.vdr' file of a recording
if Setup.UseDolbyDigital is true (suggested by André Weidemann).
- Added a leading '0' to the day in the DayDateTime() function (thanks to Rolf
Ahrenberg).
- No longer displaying color buttons in the recording info menu if it has been
invoked from a player (reported by Jürgen Schilling).
Diffstat (limited to 'svdrp.c')
-rw-r--r-- | svdrp.c | 59 |
1 files changed, 38 insertions, 21 deletions
@@ -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.89 2005/12/30 15:42:29 kls Exp $ + * $Id: svdrp.c 1.93 2006/01/14 16:08:20 kls Exp $ */ #include "svdrp.h" @@ -229,9 +229,11 @@ const char *HelpPages[] = { "LSTR [ <number> ]\n" " List recordings. Without option, all recordings are listed. Otherwise\n" " the information for the given recording is listed.", - "LSTT [ <number> ]\n" + "LSTT [ <number> ] [ id ]\n" " List timers. Without option, all timers are listed. Otherwise\n" - " only the given timer is listed.", + " only the given timer is listed. If the keyword 'id' is given, the\n" + " channels will be listed with their unique channel ids instead of\n" + " their numbers.", "MESG <message>\n" " Displays the given message on the OSD. The message will be queued\n" " and displayed whenever this is suitable.\n", @@ -681,10 +683,6 @@ void cSVDRP::CmdGRAB(const char *Option) } else if (strcmp(FileName, "-") == 0) FileName = NULL; - else { - Reply(501, "Missing filename extension in \"%s\"", FileName); - return; - } // image quality (and obsolete type): if ((p = strtok_r(NULL, delim, &strtok_next)) != NULL) { if (strcasecmp(p, "JPEG") == 0 || strcasecmp(p, "PNM") == 0) { @@ -729,10 +727,13 @@ void cSVDRP::CmdGRAB(const char *Option) char RealFileName[PATH_MAX]; if (FileName) { if (grabImageDir) { - char *s; - asprintf(&s, "%s/%s", grabImageDir, FileName); - FileName = s; - char *slash = strrchr(FileName, '/'); // there definitely is one + char *s = 0; + char *slash = strrchr(FileName, '/'); + if (!slash) { + asprintf(&s, "%s/%s", grabImageDir, FileName); + FileName = s; + } + slash = strrchr(FileName, '/'); // there definitely is one *slash = 0; char *r = realpath(FileName, RealFileName); *slash = '/'; @@ -931,7 +932,7 @@ void cSVDRP::CmdLSTE(const char *Option) else Channel = Channels.GetByChannelID(tChannelID::FromString(Option)); if (Channel) { - Schedule = Schedules->GetSchedule(Channel->GetChannelID()); + Schedule = Schedules->GetSchedule(Channel); if (!Schedule) { Reply(550, "No schedule found"); return; @@ -1009,22 +1010,38 @@ void cSVDRP::CmdLSTR(const char *Option) void cSVDRP::CmdLSTT(const char *Option) { + int Number = 0; + bool Id = false; if (*Option) { - if (isnumber(Option)) { - cTimer *timer = Timers.Get(strtol(Option, NULL, 10) - 1); - if (timer) - Reply(250, "%d %s", timer->Index() + 1, *timer->ToText()); - else - Reply(501, "Timer \"%s\" not defined", Option); - } + char buf[strlen(Option) + 1]; + strcpy(buf, Option); + const char *delim = " \t"; + char *strtok_next; + char *p = strtok_r(buf, delim, &strtok_next); + while (p) { + if (isnumber(p)) + Number = strtol(p, NULL, 10); + else if (strcasecmp(p, "ID") == 0) + Id = true; + else { + Reply(501, "Unknown option: \"%s\"", p); + return; + } + p = strtok_r(NULL, delim, &strtok_next); + } + } + if (Number) { + cTimer *timer = Timers.Get(Number - 1); + if (timer) + Reply(250, "%d %s", timer->Index() + 1, *timer->ToText(Id)); else - Reply(501, "Error in timer number \"%s\"", Option); + Reply(501, "Timer \"%s\" not defined", Option); } else if (Timers.Count()) { for (int i = 0; i < Timers.Count(); i++) { cTimer *timer = Timers.Get(i); if (timer) - Reply(i < Timers.Count() - 1 ? -250 : 250, "%d %s", timer->Index() + 1, *timer->ToText()); + Reply(i < Timers.Count() - 1 ? -250 : 250, "%d %s", timer->Index() + 1, *timer->ToText(Id)); else Reply(501, "Timer \"%d\" not found", i + 1); } |