diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-06-02 13:57:41 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-06-02 13:57:41 +0200 |
commit | 78e11d8c6feab964586e11e9396b3b868c086343 (patch) | |
tree | 97459243aa13bd182529d6cc6aaf85be622a1a13 /recording.c | |
parent | ebf8a285b21b168be6e9853b8178d2352e58acc1 (diff) | |
download | vdr-78e11d8c6feab964586e11e9396b3b868c086343.tar.gz vdr-78e11d8c6feab964586e11e9396b3b868c086343.tar.bz2 |
Extended the interface to the script that gets called for recordings, so that in the "edited" case it also provides the name of the original recording
Diffstat (limited to 'recording.c')
-rw-r--r-- | recording.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/recording.c b/recording.c index 5400d630..b2ac48e1 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.c 2.54 2012/05/20 13:19:15 kls Exp $ + * $Id: recording.c 2.55 2012/06/02 13:52:05 kls Exp $ */ #include "recording.h" @@ -1424,13 +1424,17 @@ cMark *cMarks::GetNext(int Position) const char *cRecordingUserCommand::command = NULL; -void cRecordingUserCommand::InvokeCommand(const char *State, const char *RecordingFileName) +void cRecordingUserCommand::InvokeCommand(const char *State, const char *RecordingFileName, const char *SourceFileName) { if (command) { - cString cmd = cString::sprintf("%s %s \"%s\"", command, State, *strescape(RecordingFileName, "\\\"$")); - isyslog("executing '%s'", *cmd); - SystemExec(cmd); - } + cString cmd; + if (SourceFileName) + cmd = cString::sprintf("%s %s \"%s\" \"%s\"", command, State, *strescape(RecordingFileName, "\\\"$"), *strescape(SourceFileName, "\\\"$")); + else + cmd = cString::sprintf("%s %s \"%s\"", command, State, *strescape(RecordingFileName, "\\\"$")); + isyslog("executing '%s'", *cmd); + SystemExec(cmd); + } } // --- cIndexFileGenerator --------------------------------------------------- |