1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00

Updated device selection.

This commit is contained in:
Rolf Ahrenberg 2012-06-02 15:37:05 +03:00
parent f4126b7e2c
commit 24ecadf414
2 changed files with 13 additions and 3 deletions

View File

@ -176,3 +176,4 @@ VDR Plugin 'iptv' Revision History
2012-xx-xx: Version 0.5.3
- Tweaked reading from UDP sockets.
- Updated device selection.

View File

@ -224,11 +224,20 @@ bool cIptvDevice::ProvidesTransponder(const cChannel *Channel) const
bool cIptvDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const
{
bool result = false;
bool needsDetachReceivers = Receiving(true) && Channel && !(Channel->GetChannelID() == channelId);
bool hasPriority = Priority == IDLEPRIORITY || Priority > this->Priority();
bool needsDetachReceivers = false;
debug("cIptvDevice::ProvidesChannel(%d)\n", deviceIndex);
if (ProvidesTransponder(Channel))
if (Channel && ProvidesTransponder(Channel)) {
result = hasPriority;
if (Receiving()) {
if (Channel->GetChannelID() == channelId)
result = true;
else
needsDetachReceivers = Receiving();
}
}
if (NeedsDetachReceivers)
*NeedsDetachReceivers = needsDetachReceivers;
return result;