do not play running service again
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 18 Jan 2007 00:20:13 +0000 (00:20 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 18 Jan 2007 00:20:13 +0000 (00:20 +0000)
Navigation.py

index 06d47ac..0262a46 100644 (file)
@@ -42,6 +42,9 @@ class Navigation:
 
        def playService(self, ref, checkParentalControl = True):
                oldref = self.currentlyPlayingServiceReference
 
        def playService(self, ref, checkParentalControl = True):
                oldref = self.currentlyPlayingServiceReference
+               if ref and oldref and ref == oldref:
+                       print "ignore request to play already running service"
+                       return 0
                print "playing", ref and ref.toString()
                self.currentlyPlayingServiceReference = None
                self.currentlyPlayingService = None
                print "playing", ref and ref.toString()
                self.currentlyPlayingServiceReference = None
                self.currentlyPlayingService = None