mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
The SVDRP command LSTT now accepts the new option 'id'
This commit is contained in:
parent
419f3ab5f7
commit
f993ff108b
@ -71,6 +71,8 @@ Matthias Schniedermeyer <ms@citd.de>
|
|||||||
and had their start time changed into the future
|
and had their start time changed into the future
|
||||||
for suggesting to give the timer status a bit that is set when that timer
|
for suggesting to give the timer status a bit that is set when that timer
|
||||||
is currently recording
|
is currently recording
|
||||||
|
for suggesting to make the SVDRP command LSTT optionally list the channels
|
||||||
|
of the timers with their unique channel ids instead of their numbers
|
||||||
|
|
||||||
Miha Setina <mihasetina@softhome.net>
|
Miha Setina <mihasetina@softhome.net>
|
||||||
for translating OSD texts to the Slovenian language
|
for translating OSD texts to the Slovenian language
|
||||||
|
6
HISTORY
6
HISTORY
@ -4134,3 +4134,9 @@ Video Disk Recorder Revision History
|
|||||||
- Added a SleepMs() in cRecorder::Action() to avoid a busy loop (thanks to Ingo
|
- Added a SleepMs() in cRecorder::Action() to avoid a busy loop (thanks to Ingo
|
||||||
Schneider).
|
Schneider).
|
||||||
- Cleaned up some trailing white space.
|
- Cleaned up some trailing white space.
|
||||||
|
|
||||||
|
2006-01-08: Version 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).
|
||||||
|
6
config.h
6
config.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: config.h 1.238 2006/01/07 12:57:42 kls Exp $
|
* $Id: config.h 1.239 2006/01/08 13:08:42 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CONFIG_H
|
#ifndef __CONFIG_H
|
||||||
@ -19,8 +19,8 @@
|
|||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
|
|
||||||
#define VDRVERSION "1.3.38"
|
#define VDRVERSION "1.3.39"
|
||||||
#define VDRVERSNUM 10338 // Version * 10000 + Major * 100 + Minor
|
#define VDRVERSNUM 10339 // Version * 10000 + Major * 100 + Minor
|
||||||
|
|
||||||
#define MAXPRIORITY 99
|
#define MAXPRIORITY 99
|
||||||
#define MAXLIFETIME 99
|
#define MAXLIFETIME 99
|
||||||
|
38
svdrp.c
38
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.89 2005/12/30 15:42:29 kls Exp $
|
* $Id: svdrp.c 1.90 2006/01/08 13:31:00 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "svdrp.h"
|
#include "svdrp.h"
|
||||||
@ -229,9 +229,11 @@ const char *HelpPages[] = {
|
|||||||
"LSTR [ <number> ]\n"
|
"LSTR [ <number> ]\n"
|
||||||
" List recordings. Without option, all recordings are listed. Otherwise\n"
|
" List recordings. Without option, all recordings are listed. Otherwise\n"
|
||||||
" the information for the given recording is listed.",
|
" 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"
|
" 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"
|
"MESG <message>\n"
|
||||||
" Displays the given message on the OSD. The message will be queued\n"
|
" Displays the given message on the OSD. The message will be queued\n"
|
||||||
" and displayed whenever this is suitable.\n",
|
" and displayed whenever this is suitable.\n",
|
||||||
@ -1009,22 +1011,38 @@ void cSVDRP::CmdLSTR(const char *Option)
|
|||||||
|
|
||||||
void cSVDRP::CmdLSTT(const char *Option)
|
void cSVDRP::CmdLSTT(const char *Option)
|
||||||
{
|
{
|
||||||
|
int Number = 0;
|
||||||
|
bool Id = false;
|
||||||
if (*Option) {
|
if (*Option) {
|
||||||
if (isnumber(Option)) {
|
char buf[strlen(Option) + 1];
|
||||||
cTimer *timer = Timers.Get(strtol(Option, NULL, 10) - 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)
|
if (timer)
|
||||||
Reply(250, "%d %s", timer->Index() + 1, *timer->ToText());
|
Reply(250, "%d %s", timer->Index() + 1, *timer->ToText(Id));
|
||||||
else
|
else
|
||||||
Reply(501, "Timer \"%s\" not defined", Option);
|
Reply(501, "Timer \"%s\" not defined", Option);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
Reply(501, "Error in timer number \"%s\"", Option);
|
|
||||||
}
|
|
||||||
else if (Timers.Count()) {
|
else if (Timers.Count()) {
|
||||||
for (int i = 0; i < Timers.Count(); i++) {
|
for (int i = 0; i < Timers.Count(); i++) {
|
||||||
cTimer *timer = Timers.Get(i);
|
cTimer *timer = Timers.Get(i);
|
||||||
if (timer)
|
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
|
else
|
||||||
Reply(501, "Timer \"%d\" not found", i + 1);
|
Reply(501, "Timer \"%d\" not found", i + 1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user