summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-09-23 14:02:11 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2001-09-23 14:02:11 +0200
commitf412897373b05ea78df93b56ab9d97c4bb522801 (patch)
treea18122202f89ca354808630a8baca079b4fbad9e /menu.c
parente1f7348922bbca20c29923035cf298bf7f49a392 (diff)
downloadvdr-f412897373b05ea78df93b56ab9d97c4bb522801.tar.gz
vdr-f412897373b05ea78df93b56ab9d97c4bb522801.tar.bz2
Calling the '-r' program after editing, too
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/menu.c b/menu.c
index 54edc7ba..23b16e29 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.126 2001/09/22 14:17:27 kls Exp $
+ * $Id: menu.c 1.127 2001/09/23 10:58:48 kls Exp $
*/
#include "menu.h"
@@ -2104,12 +2104,11 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
// --- cRecordControl --------------------------------------------------------
-const char *cRecordControl::userCommand = NULL;
-
cRecordControl::cRecordControl(cDvbApi *DvbApi, cTimer *Timer)
{
eventInfo = NULL;
instantId = NULL;
+ fileName = NULL;
dvbApi = DvbApi;
if (!dvbApi) dvbApi = cDvbApi::PrimaryDvbApi;//XXX
timer = Timer;
@@ -2130,8 +2129,9 @@ cRecordControl::cRecordControl(cDvbApi *DvbApi, cTimer *Timer)
Summary = eventInfo->GetExtendedDescription();
}
cRecording Recording(timer, Subtitle, Summary);
- InvokeUserCommand(true);
- if (dvbApi->StartRecord(Recording.FileName(), Channels.GetByNumber(timer->channel)->ca, timer->priority))
+ fileName = strdup(Recording.FileName());
+ cRecordingUserCommand::InvokeCommand(RUC_BEFORERECORDING, fileName);
+ if (dvbApi->StartRecord(fileName, Channels.GetByNumber(timer->channel)->ca, timer->priority))
Recording.WriteSummary();
Interface->DisplayRecording(dvbApi->CardIndex(), true);
}
@@ -2143,6 +2143,7 @@ cRecordControl::~cRecordControl()
{
Stop(true);
delete instantId;
+ delete fileName;
}
bool cRecordControl::GetEventInfo(void)
@@ -2173,17 +2174,6 @@ bool cRecordControl::GetEventInfo(void)
return false;
}
-void cRecordControl::InvokeUserCommand(bool Before)
-{
- if (userCommand) {
- char *cmd;
- asprintf(&cmd, "%s %d", userCommand, Before);
- isyslog(LOG_INFO, "executing '%s'", cmd);
- system(cmd);
- delete cmd;
- }
-}
-
void cRecordControl::Stop(bool KeepInstant)
{
if (timer) {
@@ -2198,7 +2188,7 @@ void cRecordControl::Stop(bool KeepInstant)
}
timer = NULL;
Interface->DisplayRecording(dvbApi->CardIndex(), false);
- InvokeUserCommand(false);
+ cRecordingUserCommand::InvokeCommand(RUC_AFTERRECORDING, fileName);
}
}