Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > da95e7e5c21cf72a778ff56c7941399c > files > 25

vdr-1.6.0-4mdv2008.0.src.rpm

#! /bin/sh /usr/share/dpatch/dpatch-run
## opt-31_reelchannelscan.dpatch by Tobias Grimm <tg@e-tobi.net>
##
## Thomas Günther <tom@toms-cafe.de>:
##   - adapted to VDR-1.5.8
## Tobias Grimm <tg@e-tobi.net>:
##   - adapted to VDR-1.5.16
##   - adapted to VDR-1.5.18
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Makes VDR aware of the reelchannelscan plugin.

@DPATCH@
diff -urNad vdr-1.5.18~/vdr.c vdr-1.5.18/vdr.c
--- vdr-1.5.18~/vdr.c	2008-03-14 14:22:39.000000000 +0100
+++ vdr-1.5.18/vdr.c	2008-03-16 15:59:55.000000000 +0100
@@ -731,7 +731,14 @@
         // Make sure we have a visible programme in case device usage has changed:
         if (!EITScanner.Active() && cDevice::PrimaryDevice()->HasDecoder() && !cDevice::PrimaryDevice()->HasProgramme()) {
            static time_t lastTime = 0;
-           if ((!Menu || CheckHasProgramme) && Now - lastTime > MINCHANNELWAIT) { // !Menu to avoid interfering with the CAM if a CAM menu is open
+
+           bool reelChannelscanIsScanningOnReceivingDevice;
+           if (!cPluginManager::CallFirstService("ReelChannelscan::IsScanningOnReceivingDevice", &reelChannelscanIsScanningOnReceivingDevice))
+           {
+             reelChannelscanIsScanningOnReceivingDevice = false;
+           }
+
+           if (!reelChannelscanIsScanningOnReceivingDevice && (!Menu || CheckHasProgramme) && Now - lastTime > MINCHANNELWAIT) { // !Menu to avoid interfering with the CAM if a CAM menu is open
               cChannel *Channel = Channels.GetByNumber(cDevice::CurrentChannel());
               if (Channel && (Channel->Vpid() || Channel->Apid(0))) {
                  if (!Channels.SwitchTo(cDevice::CurrentChannel()) // try to switch to the original channel...