Skip to content

Commit

Permalink
Merge pull request #85 from mediaminister/playended
Browse files Browse the repository at this point in the history
Always reset state when playback finishes
  • Loading branch information
im85288 authored Nov 8, 2019
2 parents 717c024 + 3e6f197 commit b12964f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions resources/lib/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@ def onPlayBackStopped(self): # pylint: disable=invalid-name
''' Will be called when user stops playing a file '''
self.api.reset_addon_data()
self.state = State() # Reset state

def onPlayBackEnded(self): # pylint: disable=invalid-name
''' Will be called when Kodi has ended playing a file '''
self.api.reset_addon_data()
self.state = State() # Reset state

def onPlayBackError(self): # pylint: disable=invalid-name
''' Will be called when when playback stops due to an error '''
self.api.reset_addon_data()
self.state = State() # Reset state

0 comments on commit b12964f

Please sign in to comment.