From 1cdcedc45a967b0ff5bb120779a8448554cf16ec Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 13 Dec 2009 12:35:05 +0100 Subject: Navigation.py: add possibility to restart the same service --- Navigation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Navigation.py') diff --git a/Navigation.py b/Navigation.py index 2ca87f6f..2437bbf5 100644 --- a/Navigation.py +++ b/Navigation.py @@ -50,9 +50,9 @@ class Navigation: for x in self.record_event: x(rec_service, event) - def playService(self, ref, checkParentalControl = True): + def playService(self, ref, checkParentalControl = True, forceRestart = False): oldref = self.currentlyPlayingServiceReference - if ref and oldref and ref == oldref: + if ref and oldref and ref == oldref and not forceRestart: print "ignore request to play already running service" return 0 print "playing", ref and ref.toString() -- cgit v1.2.3 From ba7b689d2e825c0d90b6d646a7957fa35763d622 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 29 Mar 2010 12:15:32 +0200 Subject: Navigation.py: dont restart (alternative) service when not needed this fixes bug #356 --- Navigation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Navigation.py') diff --git a/Navigation.py b/Navigation.py index 2437bbf5..a905da19 100644 --- a/Navigation.py +++ b/Navigation.py @@ -53,7 +53,7 @@ class Navigation: def playService(self, ref, checkParentalControl = True, forceRestart = False): oldref = self.currentlyPlayingServiceReference if ref and oldref and ref == oldref and not forceRestart: - print "ignore request to play already running service" + print "ignore request to play already running service(1)" return 0 print "playing", ref and ref.toString() if ref is None: @@ -64,6 +64,10 @@ class Navigation: if not oldref: oldref = eServiceReference() playref = getBestPlayableServiceReference(ref, oldref) + print "playref", playref + if playref and oldref and playref == oldref and not forceRestart: + print "ignore request to play already running service(2)" + return 0 if not playref or (checkParentalControl and not parentalControl.isServicePlayable(playref, boundFunction(self.playService, checkParentalControl = False))): self.stopService() return 0 -- cgit v1.2.3