-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Added] handling of IPTV services properly #668
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also wrong |
||
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>', serviceref, '</serviceref>', | ||
extend((' <serviceref>', serviceref.replace("&", "&"), '</serviceref>', | ||
' <!-- ', stringToXML(removeBad(ref.getServiceName())), ' -->\n', | ||
)) | ||
|
||
|
@@ -785,7 +785,7 @@ def buildConfig(defaultTimer, timers, webif=False): | |
# Services | ||
for serviceref in timer.services: | ||
ref = ServiceReference(str(serviceref)) | ||
extend((' <serviceref>', serviceref, '</serviceref>', | ||
extend((' <serviceref>', serviceref.replace("&", "&"), '</serviceref>', | ||
' <!-- ', stringToXML(removeBad(ref.getServiceName())), ' -->\n', | ||
)) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also wrong. |
||
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] | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also wrong |
||
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] | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use toCompareString() instead |
||
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] | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also wrong |
||
if evt: | ||
# timespan defaults to +- 1h | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also wrong |
||
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] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also wrong |
||
|
||
if autotimer.match == "": | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also wrong |
||
if myref.valid(): | ||
appendlist.append(value) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong!