diff options
author | Jochen Dolze <vdr@dolze.de> | 2009-01-06 16:11:20 +0100 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2009-01-06 16:11:20 +0100 |
commit | c232d074e05316a418320b5c5027aa68d53bc74a (patch) | |
tree | cc5d7f640b9eee77a4557a8ae5c1a11e4303b25e /infosatepg.cpp | |
parent | fc926f81da5ac3d0a310a7fc8c960aee2b04c9bb (diff) | |
download | vdr-plugin-infosatepg-c232d074e05316a418320b5c5027aa68d53bc74a.tar.gz vdr-plugin-infosatepg-c232d074e05316a418320b5c5027aa68d53bc74a.tar.bz2 |
Improved device chooser
Improved status handling
Added italian translations (thanks to Diego Pierotto)
Diffstat (limited to 'infosatepg.cpp')
-rw-r--r-- | infosatepg.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/infosatepg.cpp b/infosatepg.cpp index 60a07a9..16a56e5 100644 --- a/infosatepg.cpp +++ b/infosatepg.cpp @@ -157,7 +157,6 @@ void cPluginInfosatepg::MainThreadHook(void) { // ok -> use this device dsyslog("infosatepg: found free device %i (live)",dev->DeviceNumber()+1); - global->dev=dev; if (global->LastCurrentChannel==-1) global->LastCurrentChannel= cDevice::PrimaryDevice()->CurrentChannel(); cDevice::PrimaryDevice()->SwitchChannel(chan,true); @@ -178,7 +177,6 @@ void cPluginInfosatepg::MainThreadHook(void) { // just use this device dsyslog("infosatepg: found already switched device %i",dev->DeviceNumber()+1); - global->dev=dev; if (cDevice::ActualDevice()->CardIndex()==i) cDevice::PrimaryDevice()->SwitchChannel(chan,true); else @@ -193,7 +191,6 @@ void cPluginInfosatepg::MainThreadHook(void) // ok -> use this device dsyslog("infosatepg: found free device %i",dev->DeviceNumber()+1); - global->dev=dev; dev->SwitchChannel(chan,false); global->SetWaitTimer(); return; @@ -215,11 +212,12 @@ cString cPluginInfosatepg::Active(void) if (cDevice::PrimaryDevice()->CurrentChannel()==global->Channel) { // we are still on infosatepg channel - cChannel *chan=Channels.GetByNumber(global->Channel); + cChannel *chan=Channels.GetByNumber(global->LastCurrentChannel); if (chan) { // switch back to users last viewed channel cDevice::PrimaryDevice()->SwitchChannel(chan,true); + global->LastCurrentChannel=-1; } } } @@ -298,24 +296,22 @@ cString cPluginInfosatepg::SVDRPCommand(const char *Command, const char *Option, else asprintf(&output,"%s Received all: no",output); asprintf(&output,"%s Processed all: %s",output,global->ProcessedAll ? "yes" : "no"); - if (global->Switched()) + asprintf(&output,"%s Switched: %s\n",output,global->Switched() ? "yes" : "no"); + if (global->WakeupTime()!=-1) { - asprintf(&output,"%s Switched: yes (%i)\n",output,global->dev->DeviceNumber()+1); + asprintf(&output,"%s WakeupTime: %04i ", global->WakeupTime()); } else { - asprintf(&output,"%s Switched: no\n",output); + asprintf(&output,"%s WakeupTime: unset ", output); } - if (global->WakeupTime()!=-1) + if (global->LastCurrentChannel!=-1) { - int hour,minute; - hour=(int) (global->WakeupTime()/100); - minute=global->WakeupTime()-(hour*100); - asprintf(&output,"%s WakeupTime: %02i:%02i\n", output,hour,minute); + asprintf(&output,"%s Switchback to: %i\n", output, global->LastCurrentChannel); } else { - asprintf(&output,"%s WakeupTime: unset\n", output); + asprintf(&output,"%s Switchback to: unset\n",output); } for (int mac=EPG_FIRST_DAY_MAC; mac<=EPG_LAST_DAY_MAC; mac++) { |