def setSeekState(self, wantstate): service = self.session.nav.getCurrentService() if service is None: print "No Service found" return pauseable = service.pause() if pauseable is not None: if wantstate == self.PLAYER_PAUSED: pauseable.pause() self.state = self.PLAYER_PAUSED if not self.shown: self.hidetimer.stop() self.show() elif wantstate == self.PLAYER_PLAYING: pauseable.unpause() self.state = self.PLAYER_PLAYING if self.shown: self.__setHideTimer() else: self.state = self.PLAYER_PLAYING
def setSeekState(self, wantstate): service = self.session.nav.getCurrentService() if service is None: print "No Service found" return pauseable = service.pause() if pauseable is not None: if wantstate == self.PLAYER_PAUSED: pauseable.pause() self.state = self.PLAYER_PAUSED if not self.shown: self.hidetimer.stop() self.show() elif wantstate == self.PLAYER_PLAYING: pauseable.unpause() self.state = self.PLAYER_PLAYING if self.shown: self.__setHideTimer() else: self.state = self.PLAYER_PLAYING