summaryrefslogtreecommitdiff
path: root/tasks.cpp
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2007-06-02 12:37:12 +0000
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2007-06-02 12:37:12 +0000
commit61bc17ffc8e77a651a0edbad809f53727a47c615 (patch)
treed5de00f58e78fabdf8f39d7ab58081bd39ee5046 /tasks.cpp
parentb6e0e09e9b5a32e90c5495b7348e6438ca17d61c (diff)
downloadvdr-plugin-live-61bc17ffc8e77a651a0edbad809f53727a47c615.tar.gz
vdr-plugin-live-61bc17ffc8e77a651a0edbad809f53727a47c615.tar.bz2
- minimum required vdr version is now 1.4.0-2
Diffstat (limited to 'tasks.cpp')
-rw-r--r--tasks.cpp19
1 files changed, 14 insertions, 5 deletions
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;