Skip to content

Commit

Permalink
Fix Crashing issues (#207)
Browse files Browse the repository at this point in the history
- Prevents crash if no frames were extracted.
- Don't start upload if it was stopped.
  • Loading branch information
Kapppa authored Oct 7, 2024
1 parent 87aea89 commit d54d476
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions vspreview/plugins/builtins/slowpics_comp/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ def on_end_search(self, uuid: str, forced: bool = False, *, conf: FindFramesWork
self.stop_upload_button.setVisible(False)
self.upload_progressbar.setValue(int())
self.upload_status_label.setText('Stopped!')
return
else:
self.upload_status_label.setText('Finished!')

Expand Down
3 changes: 3 additions & 0 deletions vspreview/plugins/builtins/slowpics_comp/workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ def run(self, conf: WorkerConfiguration) -> None:
path_name = conf.path / folder_name
path_name.mkdir(parents=True)

if not conf.frames[i]:
raise StopIteration("Output missing a frame.")

curr_filename = (path_name / folder_name).append_to_stem(f'%0{ndigits(max(conf.frames[i]))}d').with_suffix('.png')

clip = output.prepare_vs_output(
Expand Down

0 comments on commit d54d476

Please sign in to comment.