From 3e1d34f392792bbcf1bda4884c58ca9cec445d1d Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 10 Jan 2003 18:00:00 +0100 Subject: Version 1.1.21 - Fixed the 'channels.conf' entries for "Studio Universal" and "Disney Channel". - Fixed handling channels in the "Channels" menu in case there are ':@nnn' group separators without names (thanks to Guy Roussin for reporting this one). - The SVDRP command CHAN now also accepts channel IDs. - Increased the timeout until an index file is considerd no longer to be written (sometimes in time shift with heavy system load the index file was closed too early by the replay thread). - Implemented "Link Layer" based CAM support, which hopefully will solve the problems with CAMs we had in the past. To use this you need the driver version 2002-01-08 or higher (with the new firmware supporting the "Link Layer" protocol). - Added an EPG bugfix that moves the Subtitle data to the Extended Description in case the latter is empty and the Subtitle exceeds some useful length. - Since several channels put very long strings into the Subtitle part of their EPG data, that string is now limited in length when used in a recording's file name. --- svdrp.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'svdrp.c') diff --git a/svdrp.c b/svdrp.c index 66b420c..102abe0 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.49 2002/11/10 12:09:56 kls Exp $ + * $Id: svdrp.c 1.50 2002/12/22 14:04:08 kls Exp $ */ #include "svdrp.h" @@ -174,8 +174,8 @@ bool cPUTEhandler::Process(const char *s) #define MAXHELPTOPIC 10 const char *HelpPages[] = { - "CHAN [ + | - | | ]\n" - " Switch channel up, down or to the given channel number or name.\n" + "CHAN [ + | - | | | ]\n" + " Switch channel up, down or to the given channel number, name or id.\n" " Without option (or after successfully switching to the channel)\n" " it returns the current channel number and name.", "CLRE\n" @@ -412,15 +412,19 @@ void cSVDRP::CmdCHAN(const char *Option) } } else { - int i = 1; - cChannel *channel; - while ((channel = Channels.GetByNumber(i, 1)) != NULL) { - if (strcasecmp(channel->Name(), Option) == 0) { - n = i; - break; + cChannel *channel = Channels.GetByChannelID(tChannelID::FromString(Option)); + if (channel) + n = channel->Number(); + else { + int i = 1; + while ((channel = Channels.GetByNumber(i, 1)) != NULL) { + if (strcasecmp(channel->Name(), Option) == 0) { + n = channel->Number(); + break; + } + i = channel->Number() + 1; } - i = channel->Number() + 1; - } + } } if (n < 0) { Reply(501, "Undefined channel \"%s\"", Option); -- cgit v1.2.3