diff options
author | Jochen Dolze <vdr@dolze.de> | 2008-12-21 19:41:19 +0100 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2008-12-21 19:41:19 +0100 |
commit | e90b76362c281f3d55db5260076a1ca25254b3a1 (patch) | |
tree | 006bad5ab5d63c57d1ab30c9afc7aab6fdaeba89 | |
parent | 0a38f9f8cde03a188c79f66dc4b005d83a6f0cfd (diff) | |
download | vdr-plugin-infosatepg-e90b76362c281f3d55db5260076a1ca25254b3a1.tar.gz vdr-plugin-infosatepg-e90b76362c281f3d55db5260076a1ca25254b3a1.tar.bz2 |
Added WakeupTime
Added shutdown message
-rw-r--r-- | HISTORY | 6 | ||||
-rw-r--r-- | global.cpp | 1 | ||||
-rw-r--r-- | global.h | 1 | ||||
-rw-r--r-- | infosatepg.cpp | 14 | ||||
-rw-r--r-- | po/de_DE.po | 22 | ||||
-rw-r--r-- | setup.cpp | 12 | ||||
-rw-r--r-- | setup.h | 1 |
7 files changed, 43 insertions, 14 deletions
@@ -1,11 +1,15 @@ VDR Plugin 'infosatepg' Revision History ---------------------------------------- +2008-12-21: Version 0.0.6 + +- Added WakeupTime +- Added shutdown message 2008-12-17: Version 0.0.5 - Changed channel setup - Changed algorithm to find a free device -- Added SVDRP status +- Added SVDRP state 2008-11-11: Version 0.0.4 @@ -128,6 +128,7 @@ cGlobalInfosatepg::cGlobalInfosatepg() SetDirectory("/tmp"); infosatchannels=NULL; numinfosatchannels=0; + WakeupTime=0; this_day=-1; this_month=-1; } @@ -131,6 +131,7 @@ public: int Pid; int EventTimeDiff; int WaitTime; + int WakeupTime; // 0100 = 01:00 1222 = 12:22 const char *Directory() { diff --git a/infosatepg.cpp b/infosatepg.cpp index 50f04a3..c580dee 100644 --- a/infosatepg.cpp +++ b/infosatepg.cpp @@ -173,14 +173,21 @@ void cPluginInfosatepg::MainThreadHook(void) cString cPluginInfosatepg::Active(void) { - // Return a message string if shutdown should be postponed + // Returns a message string if shutdown should be postponed + if (!global->Locked()) + return tr("Infosat plugin still working"); return NULL; } time_t cPluginInfosatepg::WakeupTime(void) { - // Return custom wakeup time for shutdown script - return 0; + // Returns custom wakeup time for shutdown script + if (!global->WakeupTime) return 0; + time_t Now = time(NULL); + time_t Time = cTimer::SetTime(Now,cTimer::TimeToInt(global->WakeupTime)); + if (Time <= Now) + Time = cTimer::IncDay(Time,1); + return Time; } cOsdObject *cPluginInfosatepg::MainMenuAction(void) @@ -202,6 +209,7 @@ bool cPluginInfosatepg::SetupParse(const char *Name, const char *Value) else if (!strcasecmp(Name,"Pid")) global->Pid=atoi(Value); else if (!strcasecmp(Name,"WaitTime")) global->WaitTime=atoi(Value); else if (!strcasecmp(Name,"EventTimeDiff")) global->EventTimeDiff=60*atoi(Value); + else if (!strcasecmp(Name,"WakeupTime")) global->WakeupTime=atoi(Value); else if (!strncasecmp(Name,"Channel",7)) { if (strlen(Name)<10) return false; diff --git a/po/de_DE.po b/po/de_DE.po index 896e7be..330d49d 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-1.6.0\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2008-12-10 23:03+0100\n" +"POT-Creation-Date: 2008-12-21 19:39+0100\n" "PO-Revision-Date: 2008-05-02 16:20+0200\n" "Last-Translator: Jochen Dolze <infosatepg@dolze.de>\n" "Language-Team: <vdr@linuxtv.org>\n" @@ -15,6 +15,9 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +msgid "Infosat plugin still working" +msgstr "Infosat Plugin ist noch nicht fertig" + msgid "Infosat channellist available" msgstr "Infosat Kanalliste verfügbar" @@ -27,14 +30,20 @@ msgstr "Kanal" msgid "Pid" msgstr "Pid" -msgid "Options" -msgstr "Optionen" +msgid "Event options" +msgstr "Ereignis-Optionen" -msgid "WaitTime [s]" +msgid "Wait time [s]" msgstr "Wartezeit [s]" -msgid "Event TimeDiff [min]" -msgstr "Zeitdifferenz Ereignis [min]" +msgid "Time difference [min]" +msgstr "Zeitdifferenz [min]" + +msgid "Wakeup options" +msgstr "Weck-Optionen" + +msgid "Wakeup time" +msgstr "Weckzeit" msgid "Infosat channels" msgstr "Infosat Kanäle" @@ -59,3 +68,4 @@ msgstr "komplett" msgid "Read EPG info from infosat" msgstr "Liest EPG infos von Infosat" + @@ -16,18 +16,21 @@ cMenuSetupInfosatepg::cMenuSetupInfosatepg(cGlobalInfosatepg *Global) newChannel = global->Channel; newPid = global->Pid; newWaitTime = global->WaitTime; + newWakeupTime = global->WakeupTime; newEventTimeDiff=(int) (global->EventTimeDiff/60); Add(NewTitle(tr("Scan parameter"))); cOsdItem *firstItem = new cMenuEditIntItem( tr("Channel"), &newChannel,1,Channels.MaxNumber()); Add(firstItem); Add(new cMenuEditIntItem( tr("Pid"), &newPid,1,8191)); - - Add(NewTitle(tr("Options"))); - Add(new cMenuEditIntItem( tr("WaitTime [s]"), &newWaitTime,MIN_WAITTIME,MAX_WAITTIME)); - Add(new cMenuEditIntItem( tr("Event TimeDiff [min]"), &newEventTimeDiff, + Add(NewTitle(tr("Event options"))); + Add(new cMenuEditIntItem( tr("Wait time [s]"), &newWaitTime,MIN_WAITTIME,MAX_WAITTIME)); + Add(new cMenuEditIntItem( tr("Time difference [min]"), &newEventTimeDiff, MIN_EVENTTIMEDIFF,MAX_EVENTTIMEDIFF)); + Add(NewTitle(tr("Wakeup options"))); + Add(new cMenuEditTimeItem(tr("Wakeup time"),&newWakeupTime)); + if (global->InfosatChannels()) { Add(NewTitle(tr("Infosat channels")),true); @@ -63,6 +66,7 @@ void cMenuSetupInfosatepg::Store(void) SetupStore("Pid", global->Pid = newPid); SetupStore("WaitTime", global->WaitTime = newWaitTime); SetupStore("EventTimeDiff", newEventTimeDiff); + SetupStore("WakeupTime",global->WakeupTime = newWakeupTime); global->EventTimeDiff = 60*newEventTimeDiff; if (bReprocess) global->ResetProcessedFlags(); @@ -19,6 +19,7 @@ private: cGlobalInfosatepg *global; int newChannel; int newWaitTime; + int newWakeupTime; int newEventTimeDiff; int newPid; int chanCurrent; |