fix drawing of configSequence string
[enigma2.git] / RecordTimer.py
index 0d3d53d..286d523 100644 (file)
@@ -10,7 +10,7 @@ from Tools.XMLTools import elementsWithTag
 from ServiceReference import ServiceReference
 
 class RecordTimerEntry(TimerEntry):
 from ServiceReference import ServiceReference
 
 class RecordTimerEntry(TimerEntry):
-       def __init__(self, begin, end, serviceref, epg):
+       def __init__(self, begin, end, serviceref, epg, description):
                TimerEntry.__init__(self, int(begin), int(end))
                
                assert isinstance(serviceref, ServiceReference)
                TimerEntry.__init__(self, int(begin), int(end))
                
                assert isinstance(serviceref, ServiceReference)
@@ -19,6 +19,7 @@ class RecordTimerEntry(TimerEntry):
                
                print self.service_ref.getServiceName()
                self.epg_data = epg
                
                print self.service_ref.getServiceName()
                self.epg_data = epg
+               self.description = description
                self.timer = None
                self.record_service = None
                
                self.timer = None
                self.record_service = None
                
@@ -55,9 +56,10 @@ def createTimer(xml):
        begin = int(xml.getAttribute("begin"))
        end = int(xml.getAttribute("end"))
        serviceref = ServiceReference(str(xml.getAttribute("serviceref")))
        begin = int(xml.getAttribute("begin"))
        end = int(xml.getAttribute("end"))
        serviceref = ServiceReference(str(xml.getAttribute("serviceref")))
+       description = xml.getAttribute("description")
        epgdata = xml.getAttribute("epgdata")
        #filename = xml.getAttribute("filename")
        epgdata = xml.getAttribute("epgdata")
        #filename = xml.getAttribute("filename")
-       return RecordTimerEntry(begin, end, serviceref, epgdata)
+       return RecordTimerEntry(begin, end, serviceref, epgdata, description)
 
 class RecordTimer(Timer):
        def __init__(self):
 
 class RecordTimer(Timer):
        def __init__(self):
@@ -65,10 +67,10 @@ class RecordTimer(Timer):
                
                self.Filename = "timers.xml"
                
                
                self.Filename = "timers.xml"
                
-#              try:
-               self.loadTimer()
-#              except:
-#                      print "unable to load timers from file!"
+               try:
+                       self.loadTimer()
+               except:
+                       print "unable to load timers from file!"
        
        def loadTimer(self):
                
        
        def loadTimer(self):
                
@@ -93,6 +95,7 @@ class RecordTimer(Timer):
                        t.setAttribute("end", str(timer.end))
                        t.setAttribute("serviceref", str(timer.service_ref))
                        #t.setAttribute("epgdata", timer.)
                        t.setAttribute("end", str(timer.end))
                        t.setAttribute("serviceref", str(timer.service_ref))
                        #t.setAttribute("epgdata", timer.)
+                       t.setAttribute("description", timer.description)
                        root_element.appendChild(t)
                        t = doc.createTextNode("\n")
                        root_element.appendChild(t)
                        root_element.appendChild(t)
                        t = doc.createTextNode("\n")
                        root_element.appendChild(t)