diff options
author | Midas <vdrportal_midas@gmx.de> | 2010-11-13 22:36:41 +0100 |
---|---|---|
committer | Midas <vdrportal_midas@gmx.de> | 2010-11-13 22:36:41 +0100 |
commit | 58379189a1a425eae045533f9f5c037a142776c5 (patch) | |
tree | 946449563874cd9d46ae090678d9e361c64b9550 /control.c | |
parent | e01f4889d18b73e586a00265ba608cdfafc18e03 (diff) | |
download | vdr-plugin-block-dev.tar.gz vdr-plugin-block-dev.tar.bz2 |
Bugfix:dev
Plugin could have been showing misbehaviour if all channels on a given
transponder were blocked and the device was locked by recording from
one of the channels. Fixed.
Features:
Updated Italian translation. Thanks again to Diego Pierotto.
Diffstat (limited to 'control.c')
-rw-r--r-- | control.c | 24 |
1 files changed, 17 insertions, 7 deletions
@@ -79,7 +79,7 @@ cControlBlock::~cControlBlock() } bool switch_success=cDevice::SwitchChannel(direction); - +// dsyslog("plugin-block-DEV: direction %i, user_direction %i, lastchannel %i, cSetupBlock::lastchannel %i, lastcchannel %s", direction, cSetupBlock::user_direction,lastchannel,cSetupBlock::LastAcceptableChannel, cSetupBlock::LastcChannel->Name()); if (!switch_success) { if (cSetupBlock::ParentalGuidance==1) @@ -92,16 +92,26 @@ cControlBlock::~cControlBlock() { if (lastchannel != 0) { - dsyslog("plugin-block: ERROR: Don't know where to switch - switching to last channel!"); + dsyslog("plugin-block: ERROR: Don't know where to switch (1) - switching to last channel!"); switch_success=Channels.SwitchTo(lastchannel); } } - if (!switch_success) dsyslog("plugin-block: ERROR: Don't know where to switch - Giving up!"); - + if (!switch_success) + { + dsyslog("plugin-block: ERROR: Don't know where to switch (2) - changing direction!"); + direction=-direction; + cSetupBlock::user_direction=direction; + switch_success=cDevice::SwitchChannel(direction); + + } + if (!switch_success) + { + dsyslog("plugin-block: ERROR: Dont' know where to switch (3) - final fallback to channel 1/direction up!"); + cSetupBlock::user_direction=1; + switch_success=Channels.SwitchTo(1); + } + if (!switch_success) dsyslog("plugin-block: Don't know where to switch (4) - Giving up! Please contact the author."); } - - - } } |