summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2007-06-02 12:37:12 (GMT)
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2007-06-02 12:37:12 (GMT)
commit61bc17ffc8e77a651a0edbad809f53727a47c615 (patch)
treed5de00f58e78fabdf8f39d7ab58081bd39ee5046
parentb6e0e09e9b5a32e90c5495b7348e6438ca17d61c (diff)
downloadvdr-plugin-live-61bc17ffc8e77a651a0edbad809f53727a47c615.tar.gz
vdr-plugin-live-61bc17ffc8e77a651a0edbad809f53727a47c615.tar.bz2
- minimum required vdr version is now 1.4.0-2
-rw-r--r--README2
-rw-r--r--pages/ibox.ecpp9
-rw-r--r--tasks.cpp19
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;