From af5a0e50e001ccf130acc4a7fe06a3baa0782574 Mon Sep 17 00:00:00 2001 From: Mizaki Date: Wed, 21 Jun 2023 22:32:06 +0100 Subject: [PATCH] Remove wait on CV rate limit in autotag --- comictaggerlib/autotagstartwindow.py | 4 - comictaggerlib/ctsettings/file.py | 8 - .../ctsettings/settngs_namespace.py | 1 - comictaggerlib/ui/autotagstartwindow.ui | 185 +++++++++--------- 4 files changed, 89 insertions(+), 109 deletions(-) diff --git a/comictaggerlib/autotagstartwindow.py b/comictaggerlib/autotagstartwindow.py index 94380e8..1f8f138 100644 --- a/comictaggerlib/autotagstartwindow.py +++ b/comictaggerlib/autotagstartwindow.py @@ -48,7 +48,6 @@ class AutoTagStartWindow(QtWidgets.QDialog): self.cbxAssumeIssueOne.setChecked(self.config.autotag_assume_1_if_no_issue_num) 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.identifier_auto_imprint) nlmt_tip = """The Name Match Ratio Threshold: Auto-Identify is for eliminating automatic @@ -73,7 +72,6 @@ class AutoTagStartWindow(QtWidgets.QDialog): self.assume_issue_one = False self.ignore_leading_digits_in_filename = False self.remove_after_success = False - self.wait_and_retry_on_rate_limit = False self.search_string = "" self.name_length_match_tolerance = self.config.identifier_series_match_search_thresh self.split_words = self.cbxSplitWords.isChecked() @@ -91,7 +89,6 @@ class AutoTagStartWindow(QtWidgets.QDialog): self.ignore_leading_digits_in_filename = self.cbxIgnoreLeadingDigitsInFilename.isChecked() self.remove_after_success = self.cbxRemoveAfterSuccess.isChecked() self.name_length_match_tolerance = self.sbNameMatchSearchThresh.value() - self.wait_and_retry_on_rate_limit = self.cbxWaitForRateLimit.isChecked() self.split_words = self.cbxSplitWords.isChecked() # persist some settings @@ -100,7 +97,6 @@ class AutoTagStartWindow(QtWidgets.QDialog): self.config.autotag_assume_1_if_no_issue_num = self.assume_issue_one self.config.autotag_ignore_leading_numbers_in_filename = self.ignore_leading_digits_in_filename self.config.autotag_remove_archive_after_successful_match = self.remove_after_success - self.config.autotag_wait_and_retry_on_rate_limit = self.wait_and_retry_on_rate_limit if self.cbxSpecifySearchString.isChecked(): self.search_string = self.leSearchString.text() diff --git a/comictaggerlib/ctsettings/file.py b/comictaggerlib/ctsettings/file.py index fb3e0d4..8283a5a 100644 --- a/comictaggerlib/ctsettings/file.py +++ b/comictaggerlib/ctsettings/file.py @@ -207,14 +207,6 @@ def autotag(parser: settngs.Manager) -> None: help="When searching ignore leading numbers in the filename", ) parser.add_setting("remove_archive_after_successful_match", default=False, cmdline=False) - parser.add_setting( - "-w", - "--wait-on-rate-limit", - dest="wait_and_retry_on_rate_limit", - action=argparse.BooleanOptionalAction, - default=True, - help="When encountering a Comic Vine rate limit\nerror, wait and retry query.\n\n", - ) def validate_file_settings(config: settngs.Config[ct_ns]) -> settngs.Config[ct_ns]: diff --git a/comictaggerlib/ctsettings/settngs_namespace.py b/comictaggerlib/ctsettings/settngs_namespace.py index 453d56a..eaa2e0e 100644 --- a/comictaggerlib/ctsettings/settngs_namespace.py +++ b/comictaggerlib/ctsettings/settngs_namespace.py @@ -102,4 +102,3 @@ class settngs_namespace(settngs.TypedNS): autotag_assume_1_if_no_issue_num: bool autotag_ignore_leading_numbers_in_filename: bool autotag_remove_archive_after_successful_match: bool - autotag_wait_and_retry_on_rate_limit: bool diff --git a/comictaggerlib/ui/autotagstartwindow.ui b/comictaggerlib/ui/autotagstartwindow.ui index dcf341d..a0bb361 100644 --- a/comictaggerlib/ui/autotagstartwindow.ui +++ b/comictaggerlib/ui/autotagstartwindow.ui @@ -10,7 +10,7 @@ 0 0 519 - 440 + 448 @@ -26,84 +26,19 @@ false - - - - - 0 - 0 - + + + + Qt::Horizontal - - - - - true + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - Checks the publisher against a list of imprints. - - - Auto Imprint - - - - - - - - 0 - 0 - - - - Specify series search string for all selected archives: - - - - - - - - 0 - 0 - - - - Ignore leading (sequence) numbers in filename - - - - - - - - 0 - 0 - - - - Save on low confidence match - - - - - - - 0 - 0 - - - - - @@ -116,7 +51,7 @@ - + @@ -129,19 +64,6 @@ - - - - - 0 - 0 - - - - Don't use publication year in identification process - - - @@ -155,7 +77,7 @@ - + Removes existing metadata before applying retrieved metadata @@ -165,7 +87,66 @@ + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + Don't use publication year in identification process + + + + + + Checks the publisher against a list of imprints. + + + Auto Imprint + + + + + + + + 0 + 0 + + + + Specify series search string for all selected archives: + + + + + + + + 0 + 0 + + + + Save on low confidence match + + + + @@ -179,13 +160,19 @@ - + + + + 0 + 0 + + - Wait and retry when Comic Vine rate limit is exceeded (experimental) + Ignore leading (sequence) numbers in filename - + @@ -225,13 +212,19 @@ - - - - Qt::Horizontal + + + + + 0 + 0 + - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + true