From dc5b919da3cb3adf310cd75f4ba9254aab8bf534 Mon Sep 17 00:00:00 2001 From: Midas Date: Tue, 1 May 2012 11:03:15 +0200 Subject: Compatibility: added LiveView to ChannelSwitch if vdr >= 1.7.26 increased dev version. --- block.c | 2 +- status.c | 9 ++++++++- status.h | 5 +++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index 37f3460..be2817b 100644 --- a/block.c +++ b/block.c @@ -20,7 +20,7 @@ #include using namespace std; -static const char *VERSION = "0.1.2~201204240222dev"; +static const char *VERSION = "0.1.2~201205010137dev"; static const char *DESCRIPTION = trNOOP("Block unwanted shows by EPG title"); static const char *MAINMENUENTRY = trNOOP("(De)Block broadcast"); diff --git a/status.c b/status.c index aff12ac..7404b9a 100644 --- a/status.c +++ b/status.c @@ -14,8 +14,11 @@ cStatusBlock::cStatusBlock(void): cStatus() { } - +#if VDRVERSNUM < 10726 void cStatusBlock::ChannelSwitch(const cDevice *Device, int ChannelNumber) +#else +void cStatusBlock::ChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView) +#endif { int current_channel=cDevice::CurrentChannel(); #ifdef LOGGING @@ -49,7 +52,11 @@ void cStatusBlock::ChannelSwitch(const cDevice *Device, int ChannelNumber) } #endif +#if VDRVERSNUM < 10726 if (Device->DeviceNumber()!=cDevice::PrimaryDevice()->DeviceNumber()) +#else + if (!LiveView) +#endif { #ifdef LOGGING dsyslog("plugin-block: Did nothing cause ChannelSwitch not on active livedevice."); diff --git a/status.h b/status.h index ece85e2..55673d8 100644 --- a/status.h +++ b/status.h @@ -14,7 +14,12 @@ class cStatusBlock : public cStatus { private: protected: +#if VDRVERSNUM < 10726 virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber); +#else + virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView); +#endif + virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On); -- cgit v1.2.3