diff options
author | Jochen Dolze <vdr@dolze.de> | 2009-02-15 17:29:14 +0100 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2009-02-15 17:29:14 +0100 |
commit | bb0871b294f05254546258048428c0aa5f8042b8 (patch) | |
tree | f0f4d05fcbc14966cee33aa69598af4be39584f9 /infosatepg.cpp | |
parent | 4623f83447b49830838880320a1fcc9922d00833 (diff) | |
download | vdr-plugin-infosatepg-bb0871b294f05254546258048428c0aa5f8042b8.tar.gz vdr-plugin-infosatepg-bb0871b294f05254546258048428c0aa5f8042b8.tar.bz2 |
Improved wakeup handling
Diffstat (limited to 'infosatepg.cpp')
-rw-r--r-- | infosatepg.cpp | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/infosatepg.cpp b/infosatepg.cpp index f1ad47a..63035c2 100644 --- a/infosatepg.cpp +++ b/infosatepg.cpp @@ -230,9 +230,9 @@ 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) global->SetWakeupTime(300); // just to be safe + if (global->WakeupTime()==-1) return 0; // just to be safe time_t Now = time(NULL); - time_t Time = cTimer::SetTime(Now,cTimer::TimeToInt(global->WakeupTime())); + time_t Time = global->WakeupTime(); double diff = difftime(Time,Now); if (diff<0) { @@ -323,39 +323,48 @@ cString cPluginInfosatepg::SVDRPCommand(const char *Command, const char *Option, global->ResetProcessed(); pmac=EPG_FIRST_DAY_MAC; - asprintf(&output,"Reprocess\n"); + asprintf(&output,"Reprocess files\n"); } if (!strcasecmp(Command,"SAVE")) { global->Save(); - asprintf(&output,"InfosatEPG state saved\n"); + asprintf(&output,"State saved\n"); } if (!strcasecmp(Command,"STAT")) { int day,month; asprintf(&output,"InfosatEPG state:\n"); + asprintf(&output,"%s Switched: %s",output,global->Switched() ? "yes" : "no"); + + if (global->LastCurrentChannel!=-1) + { + asprintf(&output,"%s Switchback to: %i\n", output, global->LastCurrentChannel); + } + else + { + asprintf(&output,"%s Switchback to: unset\n",output); + } + if (global->ReceivedAll(&day,&month)) asprintf(&output,"%s Received all: yes (%02i.%02i.)",output,day,month); else asprintf(&output,"%s Received all: no",output); asprintf(&output,"%s Processed all: %s",output,global->ProcessedAll() ? "yes" : "no"); - asprintf(&output,"%s Switched: %s\n",output,global->Switched() ? "yes" : "no"); + asprintf(&output,"%s\n",output); + + asprintf(&output,"%s Prevent shutdown until ready: %s", + output,global->NoDeferredShutdown ? "no" : "yes"); + asprintf(&output,"%s\n",output); + if (global->WakeupTime()!=-1) { - asprintf(&output,"%s WakeupTime: %04i ", output,global->WakeupTime()); + time_t wakeup = global->WakeupTime(); + asprintf(&output,"%s WakeupTime: %s ", output,ctime(&wakeup)); if (global->NoWakeup) asprintf(&output,"%s (blocked) ",output); } else { - asprintf(&output,"%s WakeupTime: unset ", output); - } - if (global->LastCurrentChannel!=-1) - { - asprintf(&output,"%s Switchback to: %i\n", output, global->LastCurrentChannel); - } - else - { - asprintf(&output,"%s Switchback to: unset\n",output); + asprintf(&output,"%s WakeupTime: unset\n", output); } asprintf(&output,"%s\n",output); |