Skip to content

Commit

Permalink
Display invalid keys for output template
Browse files Browse the repository at this point in the history
  • Loading branch information
LightArrowsEXE committed Oct 8, 2024
1 parent e89dfcd commit 24b669f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vspreview/toolbars/misc/toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@ def on_save_frame_as_clicked(self, checked: bool | None = None) -> None:
try:
suggested_path_str = template.format(**substitutions)
except KeyError:
self.main.show_message('Save name template is invalid')
invalid_keys = [key.split('}')[0] for key in template.split('{')[1:] if key.split('}')[0] not in substitutions]

self.main.show_message(f'Save name template is invalid.{f" Invalid key(s): <{', '.join(invalid_keys)}>" if invalid_keys else ""}')

return

save_path_str, file_type = QFileDialog.getSaveFileName(
Expand Down

0 comments on commit 24b669f

Please sign in to comment.