summaryrefslogtreecommitdiff
path: root/infosatepg.cpp
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2008-12-21 19:41:19 +0100
committerJochen Dolze <vdr@dolze.de>2008-12-21 19:41:19 +0100
commite90b76362c281f3d55db5260076a1ca25254b3a1 (patch)
tree006bad5ab5d63c57d1ab30c9afc7aab6fdaeba89 /infosatepg.cpp
parent0a38f9f8cde03a188c79f66dc4b005d83a6f0cfd (diff)
downloadvdr-plugin-infosatepg-e90b76362c281f3d55db5260076a1ca25254b3a1.tar.gz
vdr-plugin-infosatepg-e90b76362c281f3d55db5260076a1ca25254b3a1.tar.bz2
Added WakeupTime
Added shutdown message
Diffstat (limited to 'infosatepg.cpp')
-rw-r--r--infosatepg.cpp14
1 files changed, 11 insertions, 3 deletions
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;