follow changes
authorFelix Domke <tmbinc@elitedvb.net>
Thu, 29 Sep 2005 22:08:57 +0000 (22:08 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Thu, 29 Sep 2005 22:08:57 +0000 (22:08 +0000)
lib/python/Components/EventInfo.py
lib/python/Components/MovieList.py
lib/python/Screens/InfoBar.py

index ac7ed9b..c8e5a13 100644 (file)
@@ -25,13 +25,12 @@ class EventInfo(PerServiceDisplay):
                if service != None:
                        info = service.info()
                        if info is not None: 
-                               ev = eServiceEventPtr()
-                               if info.getEvent(ev, self.now_or_next & 1) == 0:
+                               ev = info.getEvent(self.now_or_next & 1)
+                               if ev is not None:
                                        if self.now_or_next & 2:
                                                self.setText("%d min" % (ev.m_duration / 60))
                                        else:
                                                self.setText(ev.m_event_name)
-               print "new event info in EventInfo! yeah!"
 
        def stopEvent(self):
                self.setText(
index 003302b..5b07791 100644 (file)
@@ -83,9 +83,8 @@ class MovieList(HTMLComponent, GUIComponent):
 
                movieList = [ ]
                while 1:
-                       s = eServiceReference()
-                       if list.getNext(s):
-                               del s
+                       s = list.getNext()
+                       if not s.valid():
                                del list
                                break
                        movieList.append(s)
index 0333a8b..c10dad2 100644 (file)
@@ -155,16 +155,16 @@ class InfoBar(Screen):
                        
                        # try to get event info
                        epg = None
-                       service = self.session.nav.getCurrentService()
-                       if service != None:
-                               info = iServiceInformationPtr()
-                               if not service.info(info):
-                                       ev = eServiceEventPtr()
-                                       if info.getEvent(ev, 0) == 0:
-                                               epg = ev
+                       try:
+                               service = self.session.nav.getCurrentService()
+                               info = service.info()
+                               ev = info.getEvent(0)
+                               epg = ev
+                       except:
+                               pass
+                       
                        # fix me, description. 
                        self.recording = self.session.nav.recordWithTimer(time.time(), time.time() + 30, serviceref, epg, "instant record")
        
        def showMovies(self):
                self.session.open(MovieSelection)
-