def handlePlayStatusMessage(self, status, data): position = getPlayPositionInSeconds(SESSION) duration = getDurationInSeconds(SESSION) if position and duration: # decoder sometimes provides invalid position after seeking if position > duration: position = None statusMessage = { "duration": duration, "playing": self.kodiPlayer is not None, "position": position} self.messageIn.put((self.kodiPlayer is not None, json.dumps(statusMessage)))
def handlePlayStatusMessage(self, status, data): position = getPlayPositionInSeconds(SESSION) duration = getDurationInSeconds(SESSION) if position and duration: # decoder sometimes provides invalid position after seeking if position > duration: position = None statusMessage = { "duration": duration, "playing": self.kodiPlayer is not None, "position": position } self.messageIn.put((self.kodiPlayer is not None, json.dumps(statusMessage)))
def __seekToPosition(self): if getPlayPositionInSeconds(self.session) is None: self.__timer.start(500, True) else: Notifications.RemovePopup(self.RESUME_POPUP_ID) self.doSeek(long(self.__position))
def __seekToPosition(self): if getPlayPositionInSeconds(self.session) is None: self.__timer.start(500, True) else: Notifications.RemovePopup(self.RESUME_POPUP_ID) self.doSeek(int(self.__position))