X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/63fd3a60724b9c03a70ce847955f2aa9facb423f..66238a69f495173897e7e1e62a7f05ff4356ae44:/RecordTimer.py?ds=sidebyside diff --git a/RecordTimer.py b/RecordTimer.py index aa48415a..e26bda60 100644 --- a/RecordTimer.py +++ b/RecordTimer.py @@ -86,9 +86,12 @@ def createTimer(xml): end = int(xml.getAttribute("end")) serviceref = ServiceReference(str(xml.getAttribute("serviceref"))) description = xml.getAttribute("description") + repeated = xml.getAttribute("repeated") epgdata = xml.getAttribute("epgdata") #filename = xml.getAttribute("filename") - return RecordTimerEntry(begin, end, serviceref, epgdata, description) + entry = RecordTimerEntry(begin, end, serviceref, epgdata, description) + entry.repeated = int(repeated) + return entry class RecordTimer(timer.Timer): def __init__(self): @@ -126,6 +129,7 @@ class RecordTimer(timer.Timer): t.setAttribute("begin", str(timer.begin)) t.setAttribute("end", str(timer.end)) t.setAttribute("serviceref", str(timer.service_ref)) + t.setAttribute("repeated", str(timer.repeated)) #t.setAttribute("epgdata", timer.) t.setAttribute("description", timer.description) root_element.appendChild(t) @@ -138,10 +142,12 @@ class RecordTimer(timer.Timer): file.close() def record(self, entry): + print "[Timer] Record " + str(entry) entry.Timer = self self.addTimerEntry(entry) def removeEntry(self, entry): + print "[Timer] Remove " + str(entry) if entry.state == timer.TimerEntry.StateRunning: entry.end = time.time() self.timeChanged(entry) @@ -154,7 +160,10 @@ class RecordTimer(timer.Timer): print "timer did already end - doing nothing." # now the timer should be in the processed_timers list. remove it from there. - self.processed_timers.remove(entry) + try: + self.processed_timers.remove(entry) + except: + pass def shutdown(self): self.saveTimer()