diff --git a/HISTORY b/HISTORY index 464685e..1d3c384 100644 --- a/HISTORY +++ b/HISTORY @@ -102,3 +102,4 @@ VDR Plugin 'satip' Revision History - Added configurable CI slots. - Fixed parsing of the setup values. +- Added an option to disable sources via sources.conf. diff --git a/README b/README index fc016a6..ba651da 100644 --- a/README +++ b/README @@ -60,8 +60,8 @@ vdr -P 'satip -s 192.168.0.1|DVBS2-4|Octo1;192.168.0.2|DVBT2-4|Octo2' SAT>IP satellite positions (aka. signal sources) shall be defined via sources.conf. If the source description begins with a number, it's used -as SAT>IP signal source selection parameter. Otherwise, the default -parameter is one: +as SAT>IP signal source selection parameter. A special number zero can +be used to disable the source. Otherwise, the default parameter is one: S19.2E Astra 1KR/1L/1M/2C => Signal source = 1 @@ -72,6 +72,9 @@ S19.2E 2 S19.2E 3 Astra 1KR/1L/1M/2C => Signal source = 3 +S19.2E 0 Astra 1KR/1L/1M/2C +=> Source is disabled + A channel can be assigned into a specific SAT>IP frontend by giving the identifier number in RID field of a channels.conf entry: FE = RID % 100 diff --git a/device.c b/device.c index 5cc290c..2b163fc 100644 --- a/device.c +++ b/device.c @@ -217,7 +217,11 @@ int cSatipDevice::SignalQuality(void) const bool cSatipDevice::ProvidesSource(int sourceP) const { - debug9("%s (%c) [device %u]", __PRETTY_FUNCTION__, cSource::ToChar(sourceP), deviceIndexM); + cSource *s = Sources.Get(sourceP); + debug9("%s (%c) desc='%s' [device %u]", __PRETTY_FUNCTION__, cSource::ToChar(sourceP), s ? s->Description() : "", deviceIndexM); + // source descriptions starting with '0' are disabled + if (s && s->Description() && (*(s->Description()) == '0')) + return false; if (!SatipConfig.IsOperatingModeOff() && !!cSatipDiscover::GetInstance()->GetServer(sourceP)) { int numDisabledSourcesM = SatipConfig.GetDisabledSourcesCount(); for (int i = 0; i < numDisabledSourcesM; ++i) {