- add description for timer entries
authorFelix Domke <tmbinc@elitedvb.net>
Fri, 20 May 2005 19:32:58 +0000 (19:32 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Fri, 20 May 2005 19:32:58 +0000 (19:32 +0000)
Navigation.py
RecordTimer.py
lib/python/Screens/InfoBar.py

index 57c128390316df09a1c5daf899496e574fd2ffab..5fe2651783d94c40276346badf41f17f95ff2f33 100644 (file)
@@ -71,10 +71,10 @@ class Navigation:
        def pause(self, p):
                return self.pnav.pause(p)
        
-       def recordWithTimer(self, begin, end, ref, epg):
+       def recordWithTimer(self, begin, end, ref, epg, description):
                if isinstance(ref, eServiceReference):
                        ref = ServiceReference.ServiceReference(ref)
-               entry = RecordTimer.RecordTimerEntry(begin, end, ref, epg)
+               entry = RecordTimer.RecordTimerEntry(begin, end, ref, epg, description)
                self.RecordTimer.record(entry)
                return entry
        
index 0d3d53d8918418ba0872a5590091d49d67cfdae0..37208ddc68c181cee4882111b5b6054599a750c6 100644 (file)
@@ -10,7 +10,7 @@ from Tools.XMLTools import elementsWithTag
 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)
@@ -19,6 +19,7 @@ class RecordTimerEntry(TimerEntry):
                
                print self.service_ref.getServiceName()
                self.epg_data = epg
+               self.description = description
                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")))
+       description = xml.getAttribute("description")
        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):
@@ -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("description", timer.description)
                        root_element.appendChild(t)
                        t = doc.createTextNode("\n")
                        root_element.appendChild(t)
index d868fd8bce5937ed389f170cb89dc3a530dbddcd..5112a00d0f2a579357fc4bc34ec072fa2de95b1f 100644 (file)
@@ -93,7 +93,6 @@ class InfoBar(Screen):
                                        ev = eServiceEventPtr()
                                        if info.getEvent(ev, 0) == 0:
                                                epg = ev
-
-                       self.recording = self.session.nav.recordWithTimer(time.time(), time.time() + 30, serviceref, epg)
-                       print "got entry: %s" % (str(self.recording))
+                       # fix me, description. 
+                       self.recording = self.session.nav.recordWithTimer(time.time(), time.time() + 30, serviceref, epg, "instant record")