diff options
Diffstat (limited to 'vdr.c')
-rw-r--r-- | vdr.c | 23 |
1 files changed, 15 insertions, 8 deletions
@@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/people/kls/vdr * - * $Id: vdr.c 1.61 2001/08/05 16:15:51 kls Exp $ + * $Id: vdr.c 1.63 2001/08/11 15:33:30 kls Exp $ */ #include <getopt.h> @@ -84,6 +84,7 @@ int main(int argc, char *argv[]) { "config", required_argument, NULL, 'c' }, { "daemon", no_argument, NULL, 'd' }, { "device", required_argument, NULL, 'D' }, + { "epgfile", required_argument, NULL, 'E' }, { "help", no_argument, NULL, 'h' }, { "log", required_argument, NULL, 'l' }, { "port", required_argument, NULL, 'p' }, @@ -91,12 +92,12 @@ int main(int argc, char *argv[]) { "dvd", required_argument, NULL, 'V' }, { "watchdog", required_argument, NULL, 'w' }, { "terminal", required_argument, NULL, 't' }, - { 0 } + { NULL } }; int c; int option_index = 0; - while ((c = getopt_long(argc, argv, "a:c:dD:hl:p:v:V:w:t:", long_options, &option_index)) != -1) { + while ((c = getopt_long(argc, argv, "a:c:dD:E:hl:p:t:v:V:w:", long_options, &option_index)) != -1) { switch (c) { case 'a': cDvbApi::SetAudioCommand(optarg); break; @@ -113,27 +114,34 @@ int main(int argc, char *argv[]) fprintf(stderr, "vdr: invalid DVB device number: %s\n", optarg); return 2; break; + case 'E': cSIProcessor::SetEpgDataFileName(*optarg != '-' ? optarg : NULL); + break; case 'h': printf("Usage: vdr [OPTION]\n\n" // for easier orientation, this is column 80| " -a CMD, --audio=CMD send Dolby Digital audio to stdin of command CMD\n" " -c DIR, --config=DIR read config files from DIR (default is to read them\n" " from the video directory)\n" - " -h, --help display this help and exit\n" " -d, --daemon run in daemon mode\n" " -D NUM, --device=NUM use only the given DVB device (NUM = 0, 1, 2...)\n" " there may be several -D options (default: all DVB\n" " devices will be used)\n" + " -E FILE --epgfile=FILE write the EPG data into the given FILE (default is\n" + " %s); use '-E-' to disable this\n" + " if FILE is a directory, the default EPG file will be\n" + " created in that directory\n" + " -h, --help display this help and exit\n" " -l LEVEL, --log=LEVEL set log level (default: 3)\n" " 0 = no logging, 1 = errors only,\n" " 2 = errors and info, 3 = errors, info and debug\n" " -p PORT, --port=PORT use PORT for SVDRP (default: %d)\n" " 0 turns off SVDRP\n" + " -t TTY, --terminal=TTY controlling tty\n" " -v DIR, --video=DIR use DIR as video directory (default: %s)\n" " -V DEV, --dvd=DEV use DEV as the DVD device (default: %s)\n" " -w SEC, --watchdog=SEC activate the watchdog timer with a timeout of SEC\n" " seconds (default: %d); '0' disables the watchdog\n" - " -t TTY, --terminal=TTY controlling tty\n" "\n" "Report bugs to <vdr-bugs@cadsoft.de>\n", + cSIProcessor::GetEpgDataFileName() ? cSIProcessor::GetEpgDataFileName() : "'-'", DEFAULTSVDRPPORT, VideoDirectory, #ifdef DVDSUPPORT @@ -317,9 +325,8 @@ int main(int argc, char *argv[]) if (!Menu) { cTimer *Timer = cTimer::GetMatch(); if (Timer) { - if (!cRecordControls::Start(Timer)) { - //TODO need to do something to prevent the timer from hitting over and over again... - } + if (!cRecordControls::Start(Timer)) + Timer->SetPending(true); } cRecordControls::Process(); } |