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:
parent
f4126b7e2c
commit
24ecadf414
1
HISTORY
1
HISTORY
@ -176,3 +176,4 @@ VDR Plugin 'iptv' Revision History
|
|||||||
2012-xx-xx: Version 0.5.3
|
2012-xx-xx: Version 0.5.3
|
||||||
|
|
||||||
- Tweaked reading from UDP sockets.
|
- Tweaked reading from UDP sockets.
|
||||||
|
- Updated device selection.
|
||||||
|
13
device.c
13
device.c
@ -224,11 +224,20 @@ bool cIptvDevice::ProvidesTransponder(const cChannel *Channel) const
|
|||||||
bool cIptvDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const
|
bool cIptvDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const
|
||||||
{
|
{
|
||||||
bool result = false;
|
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);
|
debug("cIptvDevice::ProvidesChannel(%d)\n", deviceIndex);
|
||||||
if (ProvidesTransponder(Channel))
|
|
||||||
|
if (Channel && ProvidesTransponder(Channel)) {
|
||||||
|
result = hasPriority;
|
||||||
|
if (Receiving()) {
|
||||||
|
if (Channel->GetChannelID() == channelId)
|
||||||
result = true;
|
result = true;
|
||||||
|
else
|
||||||
|
needsDetachReceivers = Receiving();
|
||||||
|
}
|
||||||
|
}
|
||||||
if (NeedsDetachReceivers)
|
if (NeedsDetachReceivers)
|
||||||
*NeedsDetachReceivers = needsDetachReceivers;
|
*NeedsDetachReceivers = needsDetachReceivers;
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user