X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/8d8279d975474b1cb8befad8d67df26de4104f20..91194b42d0dc174f3e550b9a440e91fccf7e03ec:/RecordTimer.py diff --git a/RecordTimer.py b/RecordTimer.py index 2fb923ba..f41a4857 100644 --- a/RecordTimer.py +++ b/RecordTimer.py @@ -12,7 +12,7 @@ from Screens.SubserviceSelection import SubserviceSelection import NavigationInstance from time import localtime -from Tools.XMLTools import elementsWithTag, mergeText +from Tools.XMLTools import elementsWithTag, mergeText, stringToXML from ServiceReference import ServiceReference # ok, for descriptions etc we have: @@ -238,9 +238,6 @@ class RecordTimer(timer.Timer): for timer in elementsWithTag(root.childNodes, "timer"): self.record(createTimer(timer)) - def strToXML(self, str): - return str.replace('&', '&').replace('<', '<').replace('>', '>').replace("'", '''). replace('"', '&qout;') - def saveTimer(self): #doc = xml.dom.minidom.Document() #root_element = doc.createElement('timers') @@ -296,20 +293,20 @@ class RecordTimer(timer.Timer): list.append(' end="' + str(int(timer.end)) + '"') list.append(' serviceref="' + str(timer.service_ref) + '"') list.append(' repeated="' + str(int(timer.repeated)) + '"') - list.append(' name="' + str(self.strToXML(timer.name)) + '"') - list.append(' description="' + str(self.strToXML(timer.description)) + '"') + list.append(' name="' + str(stringToXML(timer.name)) + '"') + list.append(' description="' + str(stringToXML(timer.description)) + '"') if timer.eit is not None: list.append(' eit="' + str(timer.eit) + '"') list.append(' disabled="' + str(int(timer.disabled)) + '"') list.append('>\n') - for time, code, msg in timer.log_entries: - list.append('') - list.append(str(msg)) - list.append('\n') + #for time, code, msg in timer.log_entries: + #list.append('') + #list.append(str(msg)) + #list.append('\n') list.append('\n') @@ -345,7 +342,7 @@ class RecordTimer(timer.Timer): time_match = ((timecmp + ((x.end - x.begin) / 60)) - chktimecmp) * 60 elif chktimecmp <= timecmp < (chktimecmp + (duration / 60)): time_match = ((chktimecmp + (duration / 60)) - timecmp) * 60 - elif x.eit is None: + else: #if x.eit is None: end = begin + duration if begin <= x.begin <= end: diff = end - x.begin