Add parameter to playService not to adjust on servicelist
authorLittlesat <littlesat99@yahoo.com>
Wed, 1 Jan 2014 13:38:56 +0000 (14:38 +0100)
committerLittlesat <littlesat99@yahoo.com>
Wed, 1 Jan 2014 13:38:56 +0000 (14:38 +0100)
Navigation.py

index 24d6935..9fbdd39 100644 (file)
@@ -53,7 +53,7 @@ class Navigation:
                for x in self.record_event:
                        x(rec_service, event)
 
-       def playService(self, ref, checkParentalControl=True, forceRestart=False):
+       def playService(self, ref, checkParentalControl=True, forceRestart=False, adjust=True):
                oldref = self.currentlyPlayingServiceOrGroup
                if ref and oldref and ref == oldref and not forceRestart:
                        print "ignore request to play already running service(1)"
@@ -64,7 +64,7 @@ class Navigation:
                        return 0
                from Components.ServiceEventTracker import InfoBarCount
                InfoBarInstance = InfoBarCount == 1 and InfoBar.instance
-               if not checkParentalControl or parentalControl.isServicePlayable(ref, boundFunction(self.playService, checkParentalControl=False, forceRestart=forceRestart)):
+               if not checkParentalControl or parentalControl.isServicePlayable(ref, boundFunction(self.playService, checkParentalControl=False, forceRestart=forceRestart, adjust=adjust)):
                        if ref.flags & eServiceReference.isGroup:
                                oldref = self.currentlyPlayingServiceReference or eServiceReference()
                                playref = getBestPlayableServiceReference(ref, oldref)
@@ -81,14 +81,14 @@ class Navigation:
                                self.pnav.stopService()
                                self.currentlyPlayingServiceReference = playref
                                self.currentlyPlayingServiceOrGroup = ref
-                               if InfoBarInstance and InfoBarInstance.servicelist.servicelist.setCurrent(ref):
+                               if InfoBarInstance and InfoBarInstance.servicelist.servicelist.setCurrent(ref, adjust):
                                        self.currentlyPlayingServiceOrGroup = InfoBarInstance.servicelist.servicelist.getCurrent()
                                if self.pnav.playService(playref):
                                        print "Failed to start", playref
                                        self.currentlyPlayingServiceReference = None
                                        self.currentlyPlayingServiceOrGroup = None
                                return 0
-               elif oldref and InfoBarInstance and InfoBarInstance.servicelist.servicelist.setCurrent(oldref):
+               elif oldref and InfoBarInstance and InfoBarInstance.servicelist.servicelist.setCurrent(oldref, adjust):
                        self.currentlyPlayingServiceOrGroup = InfoBarInstance.servicelist.servicelist.getCurrent()
                return 1