fix single sat scan
[enigma2.git] / lib / python / Components / MovieList.py
index 5b07791fbdff22927138515683d3c2b3c2d75acf..9ab58704b712173a3a3c36b20f0793c28cf0bb4f 100644 (file)
@@ -7,8 +7,6 @@ from enigma import eServiceReference, eServiceCenter, \
        eServiceCenterPtr, iListableServicePtr, \
        iStaticServiceInformationPtr
 
-
-
 RT_HALIGN_LEFT = 0
 RT_HALIGN_RIGHT = 1
 RT_HALIGN_CENTER = 2
@@ -27,11 +25,10 @@ RT_WRAP = 32
 def MovieListEntry(serviceref, serviceHandler):
        res = [ serviceref ]
 
-       info = iStaticServiceInformationPtr()
-
-       if serviceHandler.info(serviceref, info):
+       info = serviceHandler.info(serviceref)
+       
+       if info is None:
                # ignore service which refuse to info
-               del info
                return
        
        len = info.getLength(serviceref)
@@ -73,12 +70,12 @@ class MovieList(HTMLComponent, GUIComponent):
                # nice list
                
                self.list = [ ]
+               self.root = root
                
-               serviceHandler = eServiceCenterPtr()
-               eServiceCenter.getInstance(serviceHandler)
-               list = iListableServicePtr()
+               serviceHandler = eServiceCenter.getInstance()
+               list = serviceHandler.list(root)
                
-               if serviceHandler.list(root, list):
+               if list is None:
                        raise "listing of movies failed"
 
                movieList = [ ]
@@ -92,3 +89,7 @@ class MovieList(HTMLComponent, GUIComponent):
                # now process them...
                for ref in movieList:
                        self.list.append(MovieListEntry(ref, serviceHandler))
+
+       def reload(self):
+               self.load(self.root)
+               self.l.setList(self.list)