diff options
author | Jochen Dolze <vdr@dolze.de> | 2009-07-12 19:11:58 +0200 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2009-07-12 19:11:58 +0200 |
commit | 162a02363126cd4f23b561264dcf0776b3e5fd1c (patch) | |
tree | 903968fa0045d9eb26be4f2ade4eea91a15820d7 /infosatepg.cpp | |
parent | 636d56b051907e5041ee501284c4a2552489ca50 (diff) | |
download | vdr-plugin-infosatepg-162a02363126cd4f23b561264dcf0776b3e5fd1c.tar.gz vdr-plugin-infosatepg-162a02363126cd4f23b561264dcf0776b3e5fd1c.tar.bz2 |
Added patch from Jowi24 (channel not available)v0.0.9
Added processing for some special cases (Pilot, Start der X. Staffel)
Set wakeup to 3:00am if wakeup isn't set
Diffstat (limited to 'infosatepg.cpp')
-rw-r--r-- | infosatepg.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/infosatepg.cpp b/infosatepg.cpp index bf1c80f..bf8fcb4 100644 --- a/infosatepg.cpp +++ b/infosatepg.cpp @@ -161,15 +161,19 @@ void cPluginInfosatepg::MainThreadHook(void) if (ShutdownHandler.IsUserInactive()) { - // first keep the current channel in "mind" - if (global->LastCurrentChannel==-1) global->LastCurrentChannel= - cDevice::PrimaryDevice()->CurrentChannel(); - - // we are idle -> try to use live device if we can - if (cDevice::PrimaryDevice()->SwitchChannel(chan,true)) + // only switch primary device if we are not recording + if (!cDevice::PrimaryDevice()->Receiving()) { - global->SetWaitTimer(); - return; + // first keep the current channel in "mind" + if (global->LastCurrentChannel==-1) global->LastCurrentChannel= + cDevice::PrimaryDevice()->CurrentChannel(); + + // we are idle -> try to use live device if we can + if (cDevice::PrimaryDevice()->SwitchChannel(chan,true)) + { + global->SetWaitTimer(); + return; + } } } if (global->LastCurrentChannel!=-1) global->LastCurrentChannel=-1; @@ -241,7 +245,11 @@ time_t cPluginInfosatepg::WakeupTime(void) if (global->NoWakeup) return 0; // user option set -> don't wake up if (global->Channel()==-1) return 0; // we cannot receive, so we don't need to wake up - if (global->WakeupTime()==-1) return 0; // just to be safe + if (global->WakeupTime()==-1) + { + // no wakeup? set wakeup to 03:00 + global->SetWakeupTime(cTimer::SetTime(time(NULL),cTimer::TimeToInt(300))); + } time_t Now = time(NULL); time_t Time = global->WakeupTime(); if (difftime(Time,Now)<0) |