mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
The SVDRP command LSTC can now list the channels with group separators if the option ':groups' is given
This commit is contained in:
parent
742f4cc378
commit
fd60644895
@ -944,6 +944,8 @@ Andreas Mair <andreas@vdr-developer.org>
|
|||||||
for enabling fonts to be created with a width that overwrites the default width
|
for enabling fonts to be created with a width that overwrites the default width
|
||||||
for suggesting to make cBitmap::SetXpm() checks whether the given Xpm pointer is
|
for suggesting to make cBitmap::SetXpm() checks whether the given Xpm pointer is
|
||||||
not NULL
|
not NULL
|
||||||
|
for making the SVDRP command LSTC list the channels with group separators if the
|
||||||
|
option ':groups' is given
|
||||||
|
|
||||||
Olivier Jacques <jacquesolivier@hotmail.com>)
|
Olivier Jacques <jacquesolivier@hotmail.com>)
|
||||||
for translating OSD texts to the French language
|
for translating OSD texts to the French language
|
||||||
|
2
HISTORY
2
HISTORY
@ -5401,3 +5401,5 @@ Video Disk Recorder Revision History
|
|||||||
Becker).
|
Becker).
|
||||||
- VDR now uses the default configuration directory as defined in the CONFDIR
|
- VDR now uses the default configuration directory as defined in the CONFDIR
|
||||||
varable in the Makefile (thanks to Thomas Schmidt).
|
varable in the Makefile (thanks to Thomas Schmidt).
|
||||||
|
- The SVDRP command LSTC can now list the channels with group separators if the
|
||||||
|
option ':groups' is given (thanks to Andreas Mair).
|
||||||
|
15
svdrp.c
15
svdrp.c
@ -10,7 +10,7 @@
|
|||||||
* and interact with the Video Disk Recorder - or write a full featured
|
* and interact with the Video Disk Recorder - or write a full featured
|
||||||
* graphical interface that sits on top of an SVDRP connection.
|
* graphical interface that sits on top of an SVDRP connection.
|
||||||
*
|
*
|
||||||
* $Id: svdrp.c 1.102 2007/06/23 13:14:59 kls Exp $
|
* $Id: svdrp.c 1.103 2007/08/25 09:28:26 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "svdrp.h"
|
#include "svdrp.h"
|
||||||
@ -216,10 +216,12 @@ const char *HelpPages[] = {
|
|||||||
"HITK [ <key> ]\n"
|
"HITK [ <key> ]\n"
|
||||||
" Hit the given remote control key. Without option a list of all\n"
|
" Hit the given remote control key. Without option a list of all\n"
|
||||||
" valid key names is given.",
|
" valid key names is given.",
|
||||||
"LSTC [ <number> | <name> ]\n"
|
"LSTC [ :groups | <number> | <name> ]\n"
|
||||||
" List channels. Without option, all channels are listed. Otherwise\n"
|
" List channels. Without option, all channels are listed. Otherwise\n"
|
||||||
" only the given channel is listed. If a name is given, all channels\n"
|
" only the given channel is listed. If a name is given, all channels\n"
|
||||||
" containing the given string as part of their name are listed.",
|
" containing the given string as part of their name are listed.\n"
|
||||||
|
" If ':groups' is given, all channels are listed including group\n"
|
||||||
|
" separators. The channel number of a group separator is always 0.",
|
||||||
"LSTE [ <channel> ] [ now | next | at <time> ]\n"
|
"LSTE [ <channel> ] [ now | next | at <time> ]\n"
|
||||||
" List EPG data. Without any parameters all data of all channels is\n"
|
" List EPG data. Without any parameters all data of all channels is\n"
|
||||||
" listed. If a channel is given (either by number or by channel ID),\n"
|
" listed. If a channel is given (either by number or by channel ID),\n"
|
||||||
@ -862,7 +864,8 @@ void cSVDRP::CmdHITK(const char *Option)
|
|||||||
|
|
||||||
void cSVDRP::CmdLSTC(const char *Option)
|
void cSVDRP::CmdLSTC(const char *Option)
|
||||||
{
|
{
|
||||||
if (*Option) {
|
bool WithGroupSeps = strcasecmp(Option, ":groups") == 0;
|
||||||
|
if (*Option && !WithGroupSeps) {
|
||||||
if (isnumber(Option)) {
|
if (isnumber(Option)) {
|
||||||
cChannel *channel = Channels.GetByNumber(strtol(Option, NULL, 10));
|
cChannel *channel = Channels.GetByNumber(strtol(Option, NULL, 10));
|
||||||
if (channel)
|
if (channel)
|
||||||
@ -889,7 +892,9 @@ void cSVDRP::CmdLSTC(const char *Option)
|
|||||||
}
|
}
|
||||||
else if (Channels.MaxNumber() >= 1) {
|
else if (Channels.MaxNumber() >= 1) {
|
||||||
for (cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) {
|
for (cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) {
|
||||||
if (!channel->GroupSep())
|
if (WithGroupSeps)
|
||||||
|
Reply(channel->Next() ? -250: 250, "%d %s", channel->GroupSep() ? 0 : channel->Number(), *channel->ToText());
|
||||||
|
else if (!channel->GroupSep())
|
||||||
Reply(channel->Number() < Channels.MaxNumber() ? -250 : 250, "%d %s", channel->Number(), *channel->ToText());
|
Reply(channel->Number() < Channels.MaxNumber() ? -250 : 250, "%d %s", channel->Number(), *channel->ToText());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user