diff options
-rw-r--r-- | HISTORY | 6 | ||||
-rw-r--r-- | infosatepg.cpp | 26 | ||||
-rw-r--r-- | infosatepg.h | 2 | ||||
-rw-r--r-- | process.cpp | 18 |
4 files changed, 41 insertions, 11 deletions
@@ -1,5 +1,11 @@ VDR Plugin 'infosatepg' Revision History ---------------------------------------- +2009-07-12: Version 0.0.9 + +- Added patch from Jowi24 (channel not available) +- Added processing for some special cases (Pilot, Start der X. Staffel) +- Set wakeup to 3:00am if wakeup isn't set + 2009-02-16: Version 0.0.8 - Fixed wakeuptime-handling bug 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) diff --git a/infosatepg.h b/infosatepg.h index 48e5c5f..a4b2b9e 100644 --- a/infosatepg.h +++ b/infosatepg.h @@ -13,7 +13,7 @@ #include "status.h" #include "process.h" -static const char *VERSION = "0.0.8"; +static const char *VERSION = "0.0.9"; static const char *DESCRIPTION = trNOOP("Read EPG info from infosat"); class cPluginInfosatepg : public cPlugin { diff --git a/process.cpp b/process.cpp index 30b82d6..f835353 100644 --- a/process.cpp +++ b/process.cpp @@ -660,7 +660,7 @@ cEvent *cProcessInfosatepg::SearchEvent(cSchedule* Schedule, cInfosatevent *iEve { cEvent *f=NULL; int maxdiff=INT_MAX; - int eventTimeDiff=iEvent->Duration()/5; + int eventTimeDiff=iEvent->Duration()/4; if (eventTimeDiff<600) eventTimeDiff=600; for (cEvent *p = Schedule->Events()->First(); p; p = Schedule->Events()->Next(p)) @@ -885,6 +885,13 @@ bool cProcessInfosatepg::CheckOriginal_and_Episode(char **s,cInfosatevent *iEven (*s)+=11; return false; } + if (!strcmp(*s,"Sat.1 FilmFilm")) + { + // just ignore + (*s)+=14; + return false; + } + if (!strcmp(*s,"NIGHT ACTION")) { iEvent->SetAnnouncement("Action"); @@ -948,6 +955,11 @@ bool cProcessInfosatepg::CheckOriginal_and_Episode(char **s,cInfosatevent *iEven if (pOT[-1]==' ') pOT[-1]=0; // check some things if (!strcmp(pOT,"TM")) return false; + if (!strcmp(pOT,"Pilot")) + { + iEvent->SetAnnouncement("Pilot"); + return false; + } // check for (number) char *endp=NULL; long int ret =strtol(pOT,&endp,10); @@ -984,6 +996,10 @@ bool cProcessInfosatepg::CheckAnnouncement(char *s,cInfosatevent *iEvent) { iEvent->SetRating("Tipp"); } + else if ((strlen(s)>=10) && (!strncmp(s,"Start der ",10))) + { + // just ignore this + } else if ((strlen(s)>=15) && (!strncmp(s,"CARTOON NETWORK",15))) { // just ignore this |