Skip to content

Commit

Permalink
* Fixing #585 error when trying to return a video from queue that has…
Browse files Browse the repository at this point in the history
… the video track after audio or subtitiles (thanks to Hankuu)
  • Loading branch information
cdgriffith committed Aug 7, 2024
1 parent 2cf9506 commit c884dfd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 21 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* Fixing #185 audio channels not being set properly and resetting on encoder change (thanks to Tupsi)
* Fixing #522 add file fails - fixed as of 5.7.0 (thanks to pcl5x2008)
* Fixing #531 list limitation in readme that FFmpeg must support the software encoders listed (thanks to brunoais)
* Fixing #585 error when trying to return a video from queue that has the video track after audio or subtitiles (thanks to Hankuu)
* Fixing #586 audio channels being set incorrectly (thanks to Hankuu)
* Fixing #588 audio and subtitle dispositions were not set from source (thanks to GeZorTenPlotZ)

Expand Down
13 changes: 0 additions & 13 deletions FastFlix.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,6 @@ SectionEnd

Section "Uninstall"

${nsProcess::FindProcess} "FastFlix.exe" $R0

${If} $R0 == 0
DetailPrint "FastFlix is running. Closing it down"
${nsProcess::CloseProcess} "FastFlix.exe" $R0
DetailPrint "Waiting for FastFlix to close"
Sleep 2000
${Else}
DetailPrint "FastFlix was not found to be running"
${EndIf}

${nsProcess::Unload}

; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\FastFlix"
DeleteRegKey HKLM SOFTWARE\FastFlix
Expand Down
20 changes: 12 additions & 8 deletions fastflix/widgets/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,11 +1421,15 @@ def reload_video_from_queue(self, video: Video):
]
self.widgets.video_track.clear()
self.widgets.video_track.addItems(text_video_tracks)
selected_track = 0
for track in self.app.fastflix.current_video.streams.video:
if track.index == self.app.fastflix.current_video.video_settings.selected_track:
selected_track = track.index
self.widgets.video_track.setCurrentIndex(selected_track)
for i, track in enumerate(text_video_tracks):
if int(track.split(":")[0]) == self.app.fastflix.current_video.video_settings.selected_track:
self.widgets.video_track.setCurrentIndex(i)
break
else:
logger.warning(
f"Could not find selected track {self.app.fastflix.current_video.video_settings.selected_track} "
f"in {text_video_tracks}"
)

end_time = self.app.fastflix.current_video.video_settings.end_time or video.duration
if self.app.fastflix.current_video.video_settings.crop:
Expand Down Expand Up @@ -1468,7 +1472,7 @@ def reload_video_from_queue(self, video: Video):

self.app.fastflix.current_video.status = Status()
self.loading_video = False
self.page_update()
self.page_update(build_thumbnail=True, force_build_thumbnail=True)

@reusables.log_exception("fastflix", show_traceback=False)
def update_video_info(self, hide_progress=False):
Expand Down Expand Up @@ -1786,7 +1790,7 @@ def video_track_update(self):
self.loading_video = False
self.page_update(build_thumbnail=True)

def page_update(self, build_thumbnail=True):
def page_update(self, build_thumbnail=True, force_build_thumbnail=False):
while self.page_updating:
time.sleep(0.1)
self.page_updating = True
Expand All @@ -1803,7 +1807,7 @@ def page_update(self, build_thumbnail=True):
f"{int(self.remove_hdr)}:{self.preview_place}:{self.widgets.rotate.currentIndex()}:"
f"{self.widgets.flip.currentIndex()}"
)
if new_hash == self.last_thumb_hash:
if new_hash == self.last_thumb_hash and not force_build_thumbnail:
return
self.last_thumb_hash = new_hash
self.generate_thumbnail()
Expand Down

0 comments on commit c884dfd

Please sign in to comment.