From 61bc17ffc8e77a651a0edbad809f53727a47c615 Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Sat, 2 Jun 2007 12:37:12 +0000 Subject: - minimum required vdr version is now 1.4.0-2 --- README | 2 +- pages/ibox.ecpp | 9 +++++++-- tasks.cpp | 19 ++++++++++++++----- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/README b/README index 1817a3a..fbb5c41 100644 --- a/README +++ b/README @@ -30,7 +30,7 @@ fast. Requirements: ============= -VDR >= 1.4.3-3 +VDR >= 1.4.0-2 Tntnet >= 1.5.3 - http://www.tntnet.org/download.hms Cxxtools >= 1.4.3 - http://www.tntnet.org/download.hms gcc >= 3.1 diff --git a/pages/ibox.ecpp b/pages/ibox.ecpp index 0ed2f8c..666ebc2 100644 --- a/pages/ibox.ecpp +++ b/pages/ibox.ecpp @@ -30,9 +30,14 @@ bool logged_in(false); tChannelID next_chan; reply.setContentType( "application/xml" ); - if (cReplayControl::NowReplaying()) { +#if VDRVERSNUM >= 10403 + const char* NowReplaying = cReplayControl::NowReplaying(); +#else + const char* NowReplaying = cControl::Control()?cReplayControl::LastReplayed():NULL; +#endif + if (NowReplaying) { RecordingsManagerPtr recManager = LiveRecordingsManager(); - cRecording *recording = Recordings.GetByName(cReplayControl::NowReplaying()); + cRecording *recording = Recordings.GetByName(NowReplaying); if (recording) { string name(recording->Name()); size_t index = name.find_last_of('~'); diff --git a/tasks.cpp b/tasks.cpp index fc487d3..92b893e 100644 --- a/tasks.cpp +++ b/tasks.cpp @@ -15,6 +15,15 @@ using namespace std; using namespace std::tr1; using namespace std::tr1::placeholders; +const char* NowReplaying() +{ +#if VDRVERSNUM >= 10403 + return cReplayControl::NowReplaying(); +#else + return cControl::Control()?cReplayControl::LastReplayed():NULL; +#endif +} + StickyTask::StickyTask() { LiveTaskManager().AddStickyTask( *this ); @@ -47,7 +56,7 @@ void PlayRecordingTask::Action() return; } - const char *current = cReplayControl::NowReplaying(); + const char *current = NowReplaying(); if (!current || (0 != strcmp(current, recording->FileName()))) { cReplayControl::SetRecording( 0, 0 ); cControl::Shutdown(); @@ -75,7 +84,7 @@ void PauseRecordingTask::Action() return; } - const char *current = cReplayControl::NowReplaying(); + const char *current = NowReplaying(); if (!current) { SetError(tr("Not playing a recording.")); return; @@ -105,7 +114,7 @@ void StopRecordingTask::Action() return; } - const char *current = cReplayControl::NowReplaying(); + const char *current = NowReplaying(); if (!current) { SetError(tr("Not playing a recording.")); return; @@ -124,7 +133,7 @@ void ForwardRecordingTask::Action() return; } - const char *current = cReplayControl::NowReplaying(); + const char *current = NowReplaying(); if (!current) { SetError(tr("Not playing a recording.")); return; @@ -154,7 +163,7 @@ void BackwardRecordingTask::Action() return; } - const char *current = cReplayControl::NowReplaying(); + const char *current = NowReplaying(); if (!current) { SetError(tr("Not playing a recording.")); return; -- cgit v1.2.3