コード例 #1
0
ファイル: plugin.py プロジェクト: mx3L/kodiext
 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)))
コード例 #2
0
 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)))
コード例 #3
0
ファイル: plugin.py プロジェクト: mx3L/kodiext
 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))
コード例 #4
0
 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))