diff --git a/autotimer/src/AutoTimer.py b/autotimer/src/AutoTimer.py
index fef78005b..365945e83 100644
--- a/autotimer/src/AutoTimer.py
+++ b/autotimer/src/AutoTimer.py
@@ -154,7 +154,8 @@ def readXml(self, **kwargs):
# Parse Config
try:
configuration = cet_parse(XML_CONFIG).getroot()
- except:
+ except Exception as error:
+ print("An exception occurred:", error)
try:
if os_path.exists(XML_CONFIG + "_old"):
os_rename(XML_CONFIG + "_old", XML_CONFIG + "_old(1)")
@@ -365,7 +366,7 @@ def parseTimer(self, timer, epgcache, serviceHandler, recordHandler, checkEvtLim
except UnicodeDecodeError:
pass
- self.isIPTV = bool([service for service in timer.services if ":http" in service])
+ self.isIPTV = bool([service for service in timer.services if "%3a//" in service])
# As well as description, also allow timers on individual IPTV streams
if timer.searchType == "description" or self.isIPTV:
diff --git a/autotimer/src/AutoTimerComponent.py b/autotimer/src/AutoTimerComponent.py
index ff06a0e3d..ea886e7ad 100644
--- a/autotimer/src/AutoTimerComponent.py
+++ b/autotimer/src/AutoTimerComponent.py
@@ -440,11 +440,11 @@ def checkServices(self, check_service):
if s.valid():
# strip all after last :
value = s.toString()
- pos = value.rfind(':')
- if pos != -1:
- if value[pos - 1] == ':':
- pos -= 1
- value = value[:pos + 1]
+ #pos = value.rfind(':')
+ #if pos != -1:
+ # if value[pos - 1] == ':':
+ # pos -= 1
+ # value = value[:pos + 1]
if value == check_service:
return False
@@ -477,11 +477,11 @@ def getAlternative(self, override_service):
if s.valid():
# strip all after last :
value = s.toString()
- pos = value.rfind(':')
- if pos != -1:
- if value[pos - 1] == ':':
- pos -= 1
- value = value[:pos + 1]
+ #pos = value.rfind(':')
+ #if pos != -1:
+ # if value[pos - 1] == ':':
+ # pos -= 1
+ # value = value[:pos + 1]
if value == override_service:
return service
@@ -691,11 +691,11 @@ def getFastServices(self):
if s.valid():
# strip all after last :
value = s.toString()
- pos = value.rfind(':')
- if pos != -1:
- if value[pos - 1] == ':':
- pos -= 1
- value = value[:pos + 1]
+ #pos = value.rfind(':')
+ #if pos != -1:
+ # if value[pos - 1] == ':':
+ # pos -= 1
+ # value = value[:pos + 1]
comp = value.split(':')
append(':'.join(value[3:]))
@@ -730,11 +730,11 @@ def getAlternative(self, override_service):
if s.valid():
# strip all after last :
value = s.toString()
- pos = value.rfind(':')
- if pos != -1:
- if value[pos - 1] == ':':
- pos -= 1
- value = value[:pos + 1]
+ #pos = value.rfind(':')
+ #if pos != -1:
+ # if value[pos - 1] == ':':
+ # pos -= 1
+ # value = value[:pos + 1]
if ':'.join(value.split(':')[3:]) == override:
return service
diff --git a/autotimer/src/AutoTimerConfiguration.py b/autotimer/src/AutoTimerConfiguration.py
index 477f657b3..0b718438b 100644
--- a/autotimer/src/AutoTimerConfiguration.py
+++ b/autotimer/src/AutoTimerConfiguration.py
@@ -186,14 +186,14 @@ def parseEntry(element, baseTimer, defaults=False):
for service in l:
value = service.text
if value:
- myref = eServiceReference(str(value))
- if not (myref.flags & eServiceReference.isGroup):
- # strip all after last :
- pos = value.rfind(':')
- if pos != -1:
- if value[pos - 1] == ':':
- pos -= 1
- value = value[:pos + 1]
+ #myref = eServiceReference(str(value))
+ #if not (myref.flags & eServiceReference.isGroup):
+ # # strip all after last :
+ # pos = value.rfind(':')
+ # if pos != -1:
+ # if value[pos - 1] == ':':
+ # pos -= 1
+ # value = value[:pos + 1]
servicelist.append(value)
baseTimer.services = servicelist
@@ -369,14 +369,14 @@ def parseConfigOld(configuration, list, uniqueTimerId=0):
for service in elements:
value = service.text
if value:
- myref = eServiceReference(str(value))
- if not (myref.flags & eServiceReference.isGroup):
- # strip all after last :
- pos = value.rfind(':')
- if pos != -1:
- if value[pos - 1] == ':':
- pos -= 1
- value = value[:pos + 1]
+ #myref = eServiceReference(str(value))
+ #if not (myref.flags & eServiceReference.isGroup):
+ # # strip all after last :
+ # pos = value.rfind(':')
+ # if pos != -1:
+ # if value[pos - 1] == ':':
+ # pos -= 1
+ # value = value[:pos + 1]
servicelist.append(value)
else:
@@ -628,7 +628,7 @@ def buildConfig(defaultTimer, timers, webif=False):
# Services
for serviceref in defaultTimer.services:
ref = ServiceReference(str(serviceref))
- extend((' ', serviceref, '',
+ extend((' ', serviceref.replace("&", "&"), '',
' \n',
))
@@ -785,7 +785,7 @@ def buildConfig(defaultTimer, timers, webif=False):
# Services
for serviceref in timer.services:
ref = ServiceReference(str(serviceref))
- extend((' ', serviceref, '',
+ extend((' ', serviceref.replace("&", "&"), '',
' \n',
))
diff --git a/autotimer/src/AutoTimerEditor.py b/autotimer/src/AutoTimerEditor.py
index 7134bedd2..2b149f1c7 100644
--- a/autotimer/src/AutoTimerEditor.py
+++ b/autotimer/src/AutoTimerEditor.py
@@ -1536,13 +1536,13 @@ def finishedServiceSelection(self, *args):
list = self["config"].getList()
sname = args[0].toString()
- if self.typeSelection.value == "channels" and not (args[0].flags & eServiceReference.isGroup):
+ #if self.typeSelection.value == "channels" and not (args[0].flags & eServiceReference.isGroup):
# strip all after last : when adding a (non alternative) channel
- pos = sname.rfind(':')
- if pos != -1:
- if sname[pos - 1] == ':':
- pos -= 1
- sname = sname[:pos + 1]
+ #pos = sname.rfind(':')
+ #if pos != -1:
+ # if sname[pos - 1] == ':':
+ # pos -= 1
+ # sname = sname[:pos + 1]
list.append(getConfigListEntry(_("Record on"), NoSave(ConfigSelection(choices=[(sname, ServiceReference(args[0]).getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', ''))]))))
self["config"].setList(list)
@@ -1612,13 +1612,13 @@ def addAutotimerFromEvent(session, evt=None, service=None):
if service is not None:
service = str(service)
myref = eServiceReference(service)
- if not (myref.flags & eServiceReference.isGroup):
+ #if not (myref.flags & eServiceReference.isGroup):
# strip all after last :
- pos = service.rfind(':')
- if pos != -1:
- if service[pos - 1] == ':':
- pos -= 1
- service = service[:pos + 1]
+ #pos = service.rfind(':')
+ #if pos != -1:
+ # if service[pos - 1] == ':':
+ # pos -= 1
+ # service = service[:pos + 1]
sref = ServiceReference(myref)
if evt:
@@ -1704,11 +1704,11 @@ def addAutotimerFromService(session, service=None):
sref = info and info.getInfoString(service, iServiceInformation.sServiceref)
if sref:
# strip all after last :
- pos = sref.rfind(':')
- if pos != -1:
- if sref[pos - 1] == ':':
- pos -= 1
- sref = sref[:pos + 1]
+ #pos = sref.rfind(':')
+ #if pos != -1:
+ # if sref[pos - 1] == ':':
+ # pos -= 1
+ # sref = sref[:pos + 1]
sref = ServiceReference(sref)
if info:
@@ -1781,13 +1781,13 @@ def addAutotimerFromEventSilent(session, evt=None, service=None):
if service is not None:
service = str(service)
myref = eServiceReference(service)
- if not (myref.flags & eServiceReference.isGroup):
- # strip all after last :
- pos = service.rfind(':')
- if pos != -1:
- if service[pos - 1] == ':':
- pos -= 1
- service = service[:pos + 1]
+ #if not (myref.flags & eServiceReference.isGroup):
+ # # strip all after last :
+ # pos = service.rfind(':')
+ # if pos != -1:
+ # if service[pos - 1] == ':':
+ # pos -= 1
+ # service = service[:pos + 1]
if evt:
# timespan defaults to +- 1h
diff --git a/autotimer/src/AutoTimerImporter.py b/autotimer/src/AutoTimerImporter.py
index 135d96608..2194780f6 100644
--- a/autotimer/src/AutoTimerImporter.py
+++ b/autotimer/src/AutoTimerImporter.py
@@ -304,13 +304,13 @@ def accept(self):
value = item[1]
myref = eServiceReference(value)
- if not (myref.flags & eServiceReference.isGroup):
- # strip all after last :
- pos = value.rfind(':')
- if pos != -1:
- if value[pos - 1] == ':':
- pos -= 1
- value = value[:pos + 1]
+ #if not (myref.flags & eServiceReference.isGroup):
+ # # strip all after last :
+ # pos = value.rfind(':')
+ # if pos != -1:
+ # if value[pos - 1] == ':':
+ # pos -= 1
+ # value = value[:pos + 1]
autotimer.services = [value]
elif item[2] == 4: # AfterEvent
@@ -337,13 +337,13 @@ def accept(self):
if self.isIPTV:
value = str(self.sref)
myref = eServiceReference(value)
- if not (myref.flags & eServiceReference.isGroup):
- # strip all after last :
- pos = value.rfind(':')
- if pos != -1:
- if value[pos - 1] == ':':
- pos -= 1
- value = value[:pos + 1]
+ #if not (myref.flags & eServiceReference.isGroup):
+ # # strip all after last :
+ # pos = value.rfind(':')
+ # if pos != -1:
+ # if value[pos - 1] == ':':
+ # pos -= 1
+ # value = value[:pos + 1]
autotimer.services = [value]
if autotimer.match == "":
diff --git a/autotimer/src/AutoTimerResource.py b/autotimer/src/AutoTimerResource.py
index d23ced70c..e03624d41 100644
--- a/autotimer/src/AutoTimerResource.py
+++ b/autotimer/src/AutoTimerResource.py
@@ -329,13 +329,13 @@ def getA(name, default=None):
appendlist = []
for value in servicelist:
myref = eServiceReference(str(value))
- if not (myref.flags & eServiceReference.isGroup):
- # strip all after last :
- pos = value.rfind(':')
- if pos != -1:
- if value[pos - 1] == ':':
- pos -= 1
- value = value[:pos + 1]
+ #if not (myref.flags & eServiceReference.isGroup):
+ # # strip all after last :
+ # pos = value.rfind(':')
+ # if pos != -1:
+ # if value[pos - 1] == ':':
+ # pos -= 1
+ # value = value[:pos + 1]
if myref.valid():
appendlist.append(value)