From dacd767162234c558c6588f93b84a425ee4defd6 Mon Sep 17 00:00:00 2001 From: Mizaki Date: Tue, 28 Feb 2023 14:59:58 +0000 Subject: [PATCH 1/3] String widget fix --- comictaggerlib/ui/talkeruigenerator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comictaggerlib/ui/talkeruigenerator.py b/comictaggerlib/ui/talkeruigenerator.py index d34c63e..68a0dcd 100644 --- a/comictaggerlib/ui/talkeruigenerator.py +++ b/comictaggerlib/ui/talkeruigenerator.py @@ -219,7 +219,7 @@ def generate_source_option_tabs( # option.type of None should be string elif (option.type is None and option.action is None) or option.type is str: current_widget = generate_textbox(option, layout_grid) - sources["tabs"][tab_name]("widget")[option.internal_name] = current_widget + sources["tabs"][tab_name].widget[option.internal_name] = current_widget else: logger.debug(f"Unsupported talker option found. Name: {option.internal_name} Type: {option.type}") From 6133b886fb8997b6da86881e58ea8a1bd0df2c38 Mon Sep 17 00:00:00 2001 From: Mizaki Date: Tue, 28 Feb 2023 15:06:59 +0000 Subject: [PATCH 2/3] String widget fix-fix --- comictaggerlib/ui/talkeruigenerator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comictaggerlib/ui/talkeruigenerator.py b/comictaggerlib/ui/talkeruigenerator.py index 68a0dcd..eef533e 100644 --- a/comictaggerlib/ui/talkeruigenerator.py +++ b/comictaggerlib/ui/talkeruigenerator.py @@ -219,7 +219,7 @@ def generate_source_option_tabs( # option.type of None should be string elif (option.type is None and option.action is None) or option.type is str: current_widget = generate_textbox(option, layout_grid) - sources["tabs"][tab_name].widget[option.internal_name] = current_widget + sources["tabs"][tab_name].widgets[option.internal_name] = current_widget else: logger.debug(f"Unsupported talker option found. Name: {option.internal_name} Type: {option.type}") From f0b9bc6c77e5d4dc43b16afc107815e09c4d5a6b Mon Sep 17 00:00:00 2001 From: Mizaki Date: Tue, 28 Feb 2023 15:37:52 +0000 Subject: [PATCH 3/3] Missed name changes from options move --- comictaggerlib/autotagstartwindow.py | 4 ++-- comictaggerlib/cli.py | 8 ++++---- comictaggerlib/seriesselectionwindow.py | 8 ++++---- comictaggerlib/taggerwindow.py | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/comictaggerlib/autotagstartwindow.py b/comictaggerlib/autotagstartwindow.py index 9385ad7..efb3c29 100644 --- a/comictaggerlib/autotagstartwindow.py +++ b/comictaggerlib/autotagstartwindow.py @@ -49,7 +49,7 @@ class AutoTagStartWindow(QtWidgets.QDialog): self.cbxIgnoreLeadingDigitsInFilename.setChecked(self.config.autotag_ignore_leading_numbers_in_filename) self.cbxRemoveAfterSuccess.setChecked(self.config.autotag_remove_archive_after_successful_match) self.cbxWaitForRateLimit.setChecked(self.config.autotag_wait_and_retry_on_rate_limit) - self.cbxAutoImprint.setChecked(self.config.talker_auto_imprint) + self.cbxAutoImprint.setChecked(self.config.identifier_auto_imprint) nlmt_tip = """The Name Match Ratio Threshold: Auto-Identify is for eliminating automatic search matches that are too long compared to your series name search. The lower @@ -75,7 +75,7 @@ class AutoTagStartWindow(QtWidgets.QDialog): self.remove_after_success = False self.wait_and_retry_on_rate_limit = False self.search_string = "" - self.name_length_match_tolerance = self.config.talker_series_match_search_thresh + self.name_length_match_tolerance = self.config.identifier_series_match_search_thresh self.split_words = self.cbxSplitWords.isChecked() def search_string_toggle(self) -> None: diff --git a/comictaggerlib/cli.py b/comictaggerlib/cli.py index 7614dfc..c79299c 100644 --- a/comictaggerlib/cli.py +++ b/comictaggerlib/cli.py @@ -114,7 +114,7 @@ class CLI: ca = match_set.ca md = self.create_local_metadata(ca) ct_md = self.actual_issue_data_fetch(match_set.matches[int(i) - 1]["issue_id"]) - if self.config.talker_clear_metadata_on_import: + if self.config.identifier_clear_metadata_on_import: md = ct_md else: notes = ( @@ -123,7 +123,7 @@ class CLI: ) md.overlay(ct_md.replace(notes=utils.combine_notes(md.notes, notes, "Tagged with ComicTagger"))) - if self.config.talker_auto_imprint: + if self.config.identifier_auto_imprint: md.fix_publisher() self.actual_metadata_save(ca, md) @@ -427,7 +427,7 @@ class CLI: match_results.fetch_data_failures.append(str(ca.path.absolute())) return - if self.config.talker_clear_metadata_on_import: + if self.config.identifier_clear_metadata_on_import: md = ct_md else: notes = ( @@ -436,7 +436,7 @@ class CLI: ) md.overlay(ct_md.replace(notes=utils.combine_notes(md.notes, notes, "Tagged with ComicTagger"))) - if self.config.talker_auto_imprint: + if self.config.identifier_auto_imprint: md.fix_publisher() # ok, done building our metadata. time to save diff --git a/comictaggerlib/seriesselectionwindow.py b/comictaggerlib/seriesselectionwindow.py index ad7e15c..56c8706 100644 --- a/comictaggerlib/seriesselectionwindow.py +++ b/comictaggerlib/seriesselectionwindow.py @@ -151,7 +151,7 @@ class SeriesSelectionWindow(QtWidgets.QDialog): self.progdialog: QtWidgets.QProgressDialog | None = None self.search_thread: SearchThread | None = None - self.use_filter = self.config.talker_always_use_publisher_filter + self.use_filter = self.config.identifier_always_use_publisher_filter # Load to retrieve settings self.talker = talker @@ -336,7 +336,7 @@ class SeriesSelectionWindow(QtWidgets.QDialog): def perform_query(self, refresh: bool = False) -> None: self.search_thread = SearchThread( - self.talker, self.series_name, refresh, self.literal, self.config.talker_series_match_search_thresh + self.talker, self.series_name, refresh, self.literal, self.config.identifier_series_match_search_thresh ) self.search_thread.searchComplete.connect(self.search_complete) self.search_thread.progressUpdate.connect(self.search_progress_update) @@ -403,7 +403,7 @@ class SeriesSelectionWindow(QtWidgets.QDialog): # compare as str in case extra chars ie. '1976?' # - missing (none) values being converted to 'None' - consistent with prior behaviour in v1.2.3 # sort by start_year if set - if self.config.talker_sort_series_by_year: + if self.config.identifier_sort_series_by_year: try: self.ct_search_results = sorted( self.ct_search_results, @@ -421,7 +421,7 @@ class SeriesSelectionWindow(QtWidgets.QDialog): logger.exception("bad data error sorting results by count_of_issues") # move sanitized matches to the front - if self.config.talker_exact_series_matches_first: + if self.config.identifier_exact_series_matches_first: try: sanitized = utils.sanitize_title(self.series_name, False).casefold() sanitized_no_articles = utils.sanitize_title(self.series_name, True).casefold() diff --git a/comictaggerlib/taggerwindow.py b/comictaggerlib/taggerwindow.py index c395047..2b5acdc 100644 --- a/comictaggerlib/taggerwindow.py +++ b/comictaggerlib/taggerwindow.py @@ -1071,7 +1071,7 @@ class TaggerWindow(QtWidgets.QMainWindow): if self.config[0].cbl_apply_transform_on_import: new_metadata = CBLTransformer(new_metadata, self.config[0]).apply() - if self.config[0].talker_clear_form_before_populating: + if self.config[0].identifier_clear_form_before_populating: self.clear_form() notes = ( @@ -1785,7 +1785,7 @@ class TaggerWindow(QtWidgets.QMainWindow): ) md.overlay(ct_md.replace(notes=utils.combine_notes(md.notes, notes, "Tagged with ComicTagger"))) - if self.config[0].talker_auto_imprint: + if self.config[0].identifier_auto_imprint: md.fix_publisher() if not ca.write_metadata(md, self.save_data_style):