From f0ab037bf7b0e28384ffe52c545819afba9e0a30 Mon Sep 17 00:00:00 2001 From: jesterr0 Date: Thu, 26 Dec 2024 21:23:23 -0500 Subject: [PATCH] fix: if there was no release group defined the title could sometimes end in '-' --- src/frontend/wizards/rename_encode.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/frontend/wizards/rename_encode.py b/src/frontend/wizards/rename_encode.py index a6dff80..1b1b34a 100644 --- a/src/frontend/wizards/rename_encode.py +++ b/src/frontend/wizards/rename_encode.py @@ -336,9 +336,10 @@ def _release_group_validation(self) -> bool: ) is QMessageBox.StandardButton.Yes ): - self.output_entry.setText( - f"{input_text.replace(detect_group.group(1), '')}{saved_release_group}" - ) + new_name = f"{input_text.replace(detect_group.group(1), '')}{saved_release_group}" + if new_name.endswith("-"): + new_name = new_name[:-1] + self.output_entry.setText(new_name) return False elif not detect_group and saved_release_group: if (