Omdat die doordat duitsland met deze service gestopt is van een fixed xml tabel afkomen.
Mogelijke oplossing voor de GSOD... misschien deze functies toch weer onderdeel van de infobar class laten uitmaken?
diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py
index de2f0ce1f..4bbd54023 100644
--- a/lib/python/Screens/InfoBarGenerics.py
+++ b/lib/python/Screens/InfoBarGenerics.py
@@ -149,12 +149,11 @@ def getPossibleSubservicesForCurrentChannel(current_service):
return ref_in_subservices_group[0]
return []
-def getActiveSubservicesForCurrentChannel(current_service):
+def getActiveSubservicesForCurrentChannel(self, current_service):
if current_service:
possibleSubservices = getPossibleSubservicesForCurrentChannel(current_service)
activeSubservices = []
epgCache = eEPGCache.getInstance()
- idx = 0
for subservice in possibleSubservices:
events = epgCache.lookupEvent(['BDTS', (subservice, 0, -1)])
if events and len(events) == 1:
@@ -163,13 +162,20 @@ def getActiveSubservicesForCurrentChannel(current_service):
if title and "Sendepause" not in title:
starttime = datetime.datetime.fromtimestamp(event[0]).strftime('%H:%M')
endtime = datetime.datetime.fromtimestamp(event[0] + event[1]).strftime('%H:%M')
- current_show_name = title + " " + str(starttime) + "-" + str(endtime)
+ current_show_name = "%s %s-%s" % (title, str(starttime), str(endtime))
activeSubservices.append((current_show_name, subservice))
+ if not activeSubservices:
+ service = self.session.nav.getCurrentService()
+ subservices = service and service.subServices()
+ if subservices:
+ for idx in range(0, subservices.getNumberOfSubservices()):
+ subservice = subservices.getSubservice(idx)
+ activeSubservices.append((subservice.getName(), subservice))
return activeSubservices
-def hasActiveSubservicesForCurrentChannel(current_service):
- activeSubservices = getActiveSubservicesForCurrentChannel(current_service)
- return bool(activeSubservices and len(activeSubservices) > 1)
+def hasActiveSubservicesForCurrentChannel(self, current_service):
+ activeSubservices = getActiveSubservicesForCurrentChannel(self, current_service)
+ return bool(activeSubservices and len(activeSubservices))
class InfoBarDish:
def __init__(self):
@@ -2745,7 +2751,7 @@ class InfoBarSubserviceSelection:
def checkSubservicesAvail(self):
serviceRef = self.session.nav.getCurrentlyPlayingServiceReference()
- if not serviceRef or not hasActiveSubservicesForCurrentChannel(serviceRef.toString()):
+ if not serviceRef or not hasActiveSubservicesForCurrentChannel(self, serviceRef.toString()):
self["SubserviceQuickzapAction"].setEnabled(False)
self.bouquets = self.bsel = self.selectedSubservice = None
@@ -2763,7 +2769,7 @@ class InfoBarSubserviceSelection:
def changeSubservice(self, direction):
serviceRef = self.session.nav.getCurrentlyPlayingServiceReference()
if serviceRef:
- subservices = getActiveSubservicesForCurrentChannel(serviceRef.toString())
+ subservices = getActiveSubservicesForCurrentChannel(self, serviceRef.toString())
if subservices and len(subservices) > 1 and serviceRef.toString() in [x[1] for x in subservices]:
selection = [x[1] for x in subservices].index(serviceRef.toString())
selection += direction % len(subservices)
@@ -2777,7 +2783,7 @@ class InfoBarSubserviceSelection:
def subserviceSelection(self):
serviceRef = self.session.nav.getCurrentlyPlayingServiceReference()
if serviceRef:
- subservices = getActiveSubservicesForCurrentChannel(serviceRef.toString())
+ subservices = getActiveSubservicesForCurrentChannel(self, serviceRef.toString())
if subservices and len(subservices) > 1 and serviceRef.toString() in [x[1] for x in subservices]:
selection = [x[1] for x in subservices].index(serviceRef.toString())
self.bouquets = self.servicelist and self.servicelist.getBouquetList()
Edited by littlesat, 12 July 2019 - 15:25.