subservice quickzap fixes
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sat, 7 Oct 2006 15:58:04 +0000 (15:58 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sat, 7 Oct 2006 15:58:04 +0000 (15:58 +0000)
lib/python/Screens/InfoBarGenerics.py
lib/python/Screens/SubservicesQuickzap.py

index 49d8247..4d4bd7a 100644 (file)
@@ -1453,6 +1453,7 @@ class InfoBarSubserviceSelection:
                                if newservice.valid():
                                        del subservices
                                        del service
                                if newservice.valid():
                                        del subservices
                                        del service
+                                       self.doShow()
                                        self.session.nav.playService(newservice)
 
        def subserviceSelection(self):
                                        self.session.nav.playService(newservice)
 
        def subserviceSelection(self):
@@ -1484,6 +1485,7 @@ class InfoBarSubserviceSelection:
                                        self.session.open(SubservicesQuickzap, service[2])
                        else:
                                self["SubserviceQuickzapAction"].setEnabled(True)
                                        self.session.open(SubservicesQuickzap, service[2])
                        else:
                                self["SubserviceQuickzapAction"].setEnabled(True)
+                               self.doShow()
                                self.session.nav.playService(service[1])
 
 class InfoBarAdditionalInfo:
                                self.session.nav.playService(service[1])
 
 class InfoBarAdditionalInfo:
index d796107..07e35e3 100644 (file)
@@ -56,18 +56,22 @@ class SubservicesQuickzap(InfoBarShowHide, InfoBarMenu, InfoBarServiceName, Info
        
        def nextSubservice(self):
                self.updateSubservices()
        
        def nextSubservice(self):
                self.updateSubservices()
-               if self.currentlyPlayingSubservice == self.n - 1:
-                       self.playSubservice(0)
-               else:
-                       self.playSubservice(self.currentlyPlayingSubservice + 1)
+               if self.n:
+                       if self.currentlyPlayingSubservice >= self.n - 1:
+                               self.playSubservice(0)
+                       else:
+                               self.playSubservice(self.currentlyPlayingSubservice + 1)
        
        def previousSubservice(self):
                self.updateSubservices()
        
        def previousSubservice(self):
                self.updateSubservices()
-               if self.currentlyPlayingSubservice == 0:
-                       self.playSubservice(self.n - 1)
-               else:
-                       self.playSubservice(self.currentlyPlayingSubservice - 1)
-       
+               if self.n:
+                       if self.currentlyPlayingSubservice > self.n:
+                               self.currentlyPlayingSubservice = self.n
+                       if self.currentlyPlayingSubservice == 0:
+                               self.playSubservice(self.n - 1)
+                       else:
+                               self.playSubservice(self.currentlyPlayingSubservice - 1)
+
        def getSubserviceIndex(self, service):
                self.updateSubservices()
                for x in range(self.n):
        def getSubserviceIndex(self, service):
                self.updateSubservices()
                for x in range(self.n):
@@ -109,7 +113,6 @@ class SubservicesQuickzap(InfoBarShowHide, InfoBarMenu, InfoBarServiceName, Info
                        self.close()
                
        def playSubservice(self, number = 0):
                        self.close()
                
        def playSubservice(self, number = 0):
-               print "playSubservice"
                newservice = self.subservices.getSubservice(number)
                if newservice.valid():
                        del self.subservices
                newservice = self.subservices.getSubservice(number)
                if newservice.valid():
                        del self.subservices