From 5a3c5357781d8c8e04c28a1799d6f6a0e2065daf Mon Sep 17 00:00:00 2001 From: Frank Schmirler Date: Sat, 10 Mar 2012 23:44:51 +0100 Subject: API change of VDR 1.7.26: Use "occupied" instead of "avoid device". --- HISTORY | 1 + server/connection.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/HISTORY b/HISTORY index d0d04ec..cbcfd28 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,7 @@ VDR Plugin 'streamdev' Revision History --------------------------------------- +- API change of VDR 1.7.26: Use "occupied" instead of "avoid device". - Fixed ProvidesChannel() on client always returning true since the new timeout option has been added. - Updated Finnish translation (thanks to Rolf Ahrenberg) diff --git a/server/connection.c b/server/connection.c index 9b57980..0f1d3f3 100644 --- a/server/connection.c +++ b/server/connection.c @@ -44,7 +44,12 @@ void cSwitchLive::Switch(void) { mutex.Lock(); if (channel && device) { +#if APIVERSNUM >= 10722 + cDevice *d = device; + d->SetOccupied(10); +#else cDevice::SetAvoidDevice(device); +#endif if (!Channels.SwitchTo(cDevice::CurrentChannel())) { if (StreamdevServerSetup.SuspendMode == smAlways) { Channels.SwitchTo(channel->Number()); @@ -55,6 +60,9 @@ void cSwitchLive::Switch(void) device = NULL; } } +#if APIVERSNUM >= 10722 + d->SetOccupied(0); +#endif // make sure we don't come in here next time channel = NULL; switched.Signal(); -- cgit v1.2.3