Skip to content

Commit

Permalink
Workaround for Trakt playlist monitoring (#305)
Browse files Browse the repository at this point in the history
See #303 for details
  • Loading branch information
MoojMidge authored Oct 2, 2023
1 parent 0e44551 commit 649c711
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion resources/lib/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,19 @@ def _check_video(self):
if not getCondVisibility('videoplayer.content(episodes)'):
return
self.state.track = True
self.reset_queue()

if callable(getattr(Player, 'onAVStarted', None)):
def onAVStarted(self): # pylint: disable=invalid-name
"""Will be called when Kodi has a video or audiostream"""
self._check_video()

def onPlayBackStarted(self): # pylint: disable=invalid-name
"""Will be called when kodi starts playing a file"""
self.reset_queue()
else:
def onPlayBackStarted(self): # pylint: disable=invalid-name
"""Will be called when kodi starts playing a file"""
self.reset_queue()
self._check_video()

def onPlayBackPaused(self): # pylint: disable=invalid-name
Expand Down

0 comments on commit 649c711

Please sign in to comment.