From 4f7990ff2a55874b9eb65e3c9cd47dacb9f76deb Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Tue, 18 Nov 2008 00:40:19 +0100 Subject: rework decoder states --- lib/python/Screens/InfoBarGenerics.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index cdaa2c1e..409018de 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -779,12 +779,21 @@ class InfoBarSeek: print "not pauseable." state = self.SEEK_STATE_PLAY - oldstate = self.seekstate self.seekstate = state - for i in range(3): - if oldstate[i] != self.seekstate[i]: - (self.session.nav.pause, pauseable.setFastForward, pauseable.setSlowMotion)[i](self.seekstate[i]) + if pauseable is not None: + if self.seekstate[0]: + print "resolved to PAUSE" + pauseable.pause() + elif self.seekstate[1]: + print "resolved to FAST FORWARD" + pauseable.setFastForward(self.seekstate[1]) + elif self.seekstate[2]: + print "resolved to SLOW MOTION" + pauseable.setSlowMotion(self.seekstate[2]) + else: + print "resolved to PLAY" + pauseable.unpause() for c in self.onPlayStateChanged: c(self.seekstate) -- cgit v1.2.3