summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/vdr.c b/vdr.c
index 93f586a..6825363 100644
--- a/vdr.c
+++ b/vdr.c
@@ -880,23 +880,27 @@ int main(int argc, char *argv[])
if (d->MaySwitchTransponder()) {
DeviceAvailable = true; // avoids using the actual device below
if (timeout)
- Device = d; // only check other devices if they have been left alone for a while
+ // Device = d; // only check other devices if they have been left alone for a while
+ if( d->GetMaxBadPriority(Timer->Channel()) <= 0) Device = d; // LNB Sharing
}
else if (timeout && !Device && InVpsMargin && !d->Receiving() && d->ProvidesTransponderExclusively(Timer->Channel()))
- Device = d; // use this one only if no other with less impact can be found
- }
+ // Device = d; // use this one only if no other with less impact can be found
+ if( d->GetMaxBadPriority(Timer->Channel()) <= 0) Device = d; // LNB Sharing
+ }
}
if (!Device && InVpsMargin && !DeviceAvailable) {
cDevice *d = cDevice::ActualDevice();
if (!d->Receiving() && d->ProvidesTransponder(Timer->Channel()) && Now - DeviceUsed[d->DeviceNumber()] > TIMERDEVICETIMEOUT)
- Device = d; // use the actual device as a last resort
+ // Device = d; // use the actual device as a last resort
+ if( d->GetMaxBadPriority(Timer->Channel()) <= 0) Device = d; // LNB Sharing
+
}
// Switch the device to the transponder:
if (Device) {
if (!Device->IsTunedToTransponder(Timer->Channel())) {
if (Device == cDevice::ActualDevice() && !Device->IsPrimaryDevice())
cDevice::PrimaryDevice()->StopReplay(); // stop transfer mode
- dsyslog("switching device %d to channel %d", Device->DeviceNumber() + 1, Timer->Channel()->Number());
+ dsyslog("VDR: switching device %d to channel %d", Device->DeviceNumber() + 1, Timer->Channel()->Number());
Device->SwitchChannel(Timer->Channel(), false);
DeviceUsed[Device->DeviceNumber()] = Now;
}