def _monitor(self):
try:
while not xbmc.abortRequested and not self._closed:
if not self.isPlaying():
util.DEBUG_LOG('Player: Idling...')
while not self.isPlaying() and not xbmc.abortRequested and not self._closed:
util.MONITOR.waitForAbort(0.1)
if self.isPlayingVideo():
util.DEBUG_LOG('Monitoring video...')
self._videoMonitor()
elif self.isPlayingAudio():
util.DEBUG_LOG('Monitoring audio...')
self._audioMonitor()
elif self.isPlaying():
util.DEBUG_LOG('Monitoring pre-play...')
self._preplayMonitor()
self.handler.close()
self.close()
util.DEBUG_LOG('Player: Closed')
finally:
self.trigger('session.ended')
评论列表
文章目录