From 33796aa4756d9ce91219dbc036dcbacc7ae25e68 Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Thu, 6 Apr 2023 10:48:40 -0700 Subject: [PATCH] Fix #447 --- comictaggerlib/cli.py | 22 +++++++++------------- comictaggerlib/renamewindow.py | 2 +- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/comictaggerlib/cli.py b/comictaggerlib/cli.py index c79299c..ea9828d 100644 --- a/comictaggerlib/cli.py +++ b/comictaggerlib/cli.py @@ -458,18 +458,18 @@ class CLI: return new_ext = "" # default - if self.config.filename_rename_set_extension_based_on_archive: + if self.config.rename_set_extension_based_on_archive: new_ext = ca.extension() renamer = FileRenamer( md, - platform="universal" if self.config.filename_rename_strict else "auto", + platform="universal" if self.config.rename_strict else "auto", replacements=self.config.rename_replacements, ) - renamer.set_template(self.config.filename_rename_template) - renamer.set_issue_zero_padding(self.config.filename_rename_issue_number_padding) - renamer.set_smart_cleanup(self.config.filename_rename_use_smart_string_cleanup) - renamer.move = self.config.filename_rename_move_to_dir + renamer.set_template(self.config.rename_template) + renamer.set_issue_zero_padding(self.config.rename_issue_number_padding) + renamer.set_smart_cleanup(self.config.rename_use_smart_string_cleanup) + renamer.move = self.config.rename_move_to_dir try: new_name = renamer.determine_name(ext=new_ext) @@ -481,17 +481,13 @@ class CLI: "Please consult the template help in the settings " "and the documentation on the format at " "https://docs.python.org/3/library/string.html#format-string-syntax", - self.config.filename_rename_template, + self.config.rename_template, ) return except Exception: - logger.exception( - "Formatter failure: %s metadata: %s", self.config.filename_rename_template, renamer.metadata - ) + logger.exception("Formatter failure: %s metadata: %s", self.config.rename_template, renamer.metadata) - folder = get_rename_dir( - ca, self.config.filename_rename_dir if self.config.filename_rename_move_to_dir else None - ) + folder = get_rename_dir(ca, self.config.rename_dir if self.config.rename_move_to_dir else None) full_path = folder / new_name diff --git a/comictaggerlib/renamewindow.py b/comictaggerlib/renamewindow.py index 4f0eb4c..9bc31a4 100644 --- a/comictaggerlib/renamewindow.py +++ b/comictaggerlib/renamewindow.py @@ -73,7 +73,7 @@ class RenameWindow(QtWidgets.QDialog): self.renamer.replacements = self.config[0].rename_replacements new_ext = ca.path.suffix # default - if self.config[0].filename_rename_set_extension_based_on_archive: + if self.config[0].rename_set_extension_based_on_archive: new_ext = ca.extension() if md is None: