diff --git a/tboplayer.py b/tboplayer.py index 124c210..bfd425b 100644 --- a/tboplayer.py +++ b/tboplayer.py @@ -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 @@ -2254,7 +2255,7 @@ def nope(self): # *************************************** if __name__ == "__main__": - datestring="21 Dec 2018" + datestring="30 Dec 2018" dbusif_tboplayer = None try: diff --git a/ytdl.py b/ytdl.py index 265f7ac..05ccd68 100644 --- a/ytdl.py +++ b/ytdl.py @@ -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 +