mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
The SVDRP command PUTE now supports reading the EPG data from a given file
This commit is contained in:
parent
c674d80762
commit
b36d06e1ea
@ -599,6 +599,7 @@ Helmut Auer <vdr@helmutauer.de>
|
|||||||
currently disabled
|
currently disabled
|
||||||
for suggesting to improve logging system time changes to avoid problems on slow
|
for suggesting to improve logging system time changes to avoid problems on slow
|
||||||
systems under heavy load
|
systems under heavy load
|
||||||
|
for making the SVDRP command PUTE support reading the EPG data from a given file
|
||||||
|
|
||||||
Jeremy Hall <jhall@UU.NET>
|
Jeremy Hall <jhall@UU.NET>
|
||||||
for fixing an incomplete initialization of the filter parameters in eit.c
|
for fixing an incomplete initialization of the filter parameters in eit.c
|
||||||
|
2
HISTORY
2
HISTORY
@ -6037,3 +6037,5 @@ Video Disk Recorder Revision History
|
|||||||
- Made MAXFRAMESIZE a multiple of TS_SIZE to avoid breaking up TS packets.
|
- Made MAXFRAMESIZE a multiple of TS_SIZE to avoid breaking up TS packets.
|
||||||
- No longer resetting the patPmtParser in cDevice::PlayTs(), because this
|
- No longer resetting the patPmtParser in cDevice::PlayTs(), because this
|
||||||
caused the selected audio and subtitle tracks to fall back to the default.
|
caused the selected audio and subtitle tracks to fall back to the default.
|
||||||
|
- The SVDRP command PUTE now supports reading the EPG data from a given file
|
||||||
|
(thanks to Helmut Auer).
|
||||||
|
25
svdrp.c
25
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 2.2 2009/01/06 14:35:45 kls Exp $
|
* $Id: svdrp.c 2.3 2009/04/13 13:35:29 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "svdrp.h"
|
#include "svdrp.h"
|
||||||
@ -288,11 +288,14 @@ const char *HelpPages[] = {
|
|||||||
" If 'help' is followed by a command, the detailed help for that command is\n"
|
" If 'help' is followed by a command, the detailed help for that command is\n"
|
||||||
" given. The keyword 'main' initiates a call to the main menu function of the\n"
|
" given. The keyword 'main' initiates a call to the main menu function of the\n"
|
||||||
" given plugin.\n",
|
" given plugin.\n",
|
||||||
"PUTE\n"
|
"PUTE [ file ]\n"
|
||||||
" Put data into the EPG list. The data entered has to strictly follow the\n"
|
" Put data into the EPG list. The data entered has to strictly follow the\n"
|
||||||
" format defined in vdr(5) for the 'epg.data' file. A '.' on a line\n"
|
" format defined in vdr(5) for the 'epg.data' file. A '.' on a line\n"
|
||||||
" by itself terminates the input and starts processing of the data (all\n"
|
" by itself terminates the input and starts processing of the data (all\n"
|
||||||
" entered data is buffered until the terminating '.' is seen).",
|
" entered data is buffered until the terminating '.' is seen).\n"
|
||||||
|
" If a file name is given, epg data will be read from this file (which\n"
|
||||||
|
" must be accessible under the given name from the machine VDR is running\n"
|
||||||
|
" on). In case of file input, no terminating '.' shall be given.\n",
|
||||||
"REMO [ on | off ]\n"
|
"REMO [ on | off ]\n"
|
||||||
" Turns the remote control on or off. Without a parameter, the current\n"
|
" Turns the remote control on or off. Without a parameter, the current\n"
|
||||||
" status of the remote control is reported.",
|
" status of the remote control is reported.",
|
||||||
@ -1435,12 +1438,28 @@ void cSVDRP::CmdPLUG(const char *Option)
|
|||||||
|
|
||||||
void cSVDRP::CmdPUTE(const char *Option)
|
void cSVDRP::CmdPUTE(const char *Option)
|
||||||
{
|
{
|
||||||
|
if (*Option) {
|
||||||
|
FILE *f = fopen(Option, "r");
|
||||||
|
if (f) {
|
||||||
|
if (cSchedules::Read(f)) {
|
||||||
|
cSchedules::Cleanup(true);
|
||||||
|
Reply(250, "EPG data processed from \"%s\"", Option);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Reply(451, "Error while processing EPG from \"%s\"", Option);
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Reply(501, "Cannot open file \"%s\"", Option);
|
||||||
|
}
|
||||||
|
else {
|
||||||
delete PUTEhandler;
|
delete PUTEhandler;
|
||||||
PUTEhandler = new cPUTEhandler;
|
PUTEhandler = new cPUTEhandler;
|
||||||
Reply(PUTEhandler->Status(), "%s", PUTEhandler->Message());
|
Reply(PUTEhandler->Status(), "%s", PUTEhandler->Message());
|
||||||
if (PUTEhandler->Status() != 354)
|
if (PUTEhandler->Status() != 354)
|
||||||
DELETENULL(PUTEhandler);
|
DELETENULL(PUTEhandler);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void cSVDRP::CmdREMO(const char *Option)
|
void cSVDRP::CmdREMO(const char *Option)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user