Skip to content

Commit

Permalink
fix subtitle-related corner-case bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Henio Tierra committed Dec 30, 2018
1 parent b30af5d commit 2a638ec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tboplayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ def init_play_state_machine(self):
# kick off the state machine by playing a track
def play(self):
#initialise all the state machine variables
if self.play_state==self._OMX_CLOSED and self.playlist.track_is_selected():
if self.play_state==self._OMX_CLOSED and self.playlist.track_is_selected():
self.ytdl.reset_subtitle_attributes()
self.iteration = 0 # for debugging
self.paused = False
self.stop_required_signal=False # signal that user has pressed stop
Expand Down Expand Up @@ -2254,7 +2255,7 @@ def nope(self):
# ***************************************

if __name__ == "__main__":
datestring="21 Dec 2018"
datestring="30 Dec 2018"

dbusif_tboplayer = None
try:
Expand Down
7 changes: 7 additions & 0 deletions ytdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,10 @@ def reset_processes(self):
self._running_processes = {}
self.finished_processes = {}

def reset_subtitle_attributes(self):
self.downloading_subtitle_signal = False
self.downloaded_subtitle_signal = False
self.downloaded_partial_subtitle_signal = False
self.download_subtitle_failed_signal = False
self.subtitle_ready_signal = False

0 comments on commit 2a638ec

Please sign in to comment.