diff --git a/comictaggerlib/main.py b/comictaggerlib/main.py index 47e13a2..6657685 100755 --- a/comictaggerlib/main.py +++ b/comictaggerlib/main.py @@ -145,7 +145,17 @@ def ctmain() -> None: format="%(asctime)s | %(name)s | %(levelname)s | %(message)s", datefmt="%Y-%m-%dT%H:%M:%S", ) - # Need to load setting before anything else + + if settings.settings_warning < 4: + print( # noqa: T201 + """ +!!!Warning!!! +The next release will save settings in a different format +NO SETTINGS WILL BE TRANSFERED to the new version. +See https://github.com/comictagger/comictagger/releases/1.5.5 for more information. +""", + file=sys.stderr, + ) # manage the CV API key # None comparison is used so that the empty string can unset the value diff --git a/comictaggerlib/settings.py b/comictaggerlib/settings.py index 17b7c5d..ac17af0 100644 --- a/comictaggerlib/settings.py +++ b/comictaggerlib/settings.py @@ -70,6 +70,7 @@ class ComicTaggerSettings: # Show/ask dialog flags self.ask_about_cbi_in_rar = True self.show_disclaimer = True + self.settings_warning = 0 self.dont_notify_about_this_version = "" self.ask_about_usage_stats = True @@ -223,6 +224,8 @@ class ComicTaggerSettings: self.ask_about_cbi_in_rar = self.config.getboolean("dialogflags", "ask_about_cbi_in_rar") if self.config.has_option("dialogflags", "show_disclaimer"): self.show_disclaimer = self.config.getboolean("dialogflags", "show_disclaimer") + if self.config.has_option("dialogflags", "settings_warning"): + self.settings_warning = self.config.getint("dialogflags", "settings_warning") if self.config.has_option("dialogflags", "dont_notify_about_this_version"): self.dont_notify_about_this_version = self.config.get("dialogflags", "dont_notify_about_this_version") if self.config.has_option("dialogflags", "ask_about_usage_stats"): @@ -349,6 +352,7 @@ class ComicTaggerSettings: self.config.set("dialogflags", "ask_about_cbi_in_rar", self.ask_about_cbi_in_rar) self.config.set("dialogflags", "show_disclaimer", self.show_disclaimer) + self.config.set("dialogflags", "settings_warning", self.settings_warning) self.config.set("dialogflags", "dont_notify_about_this_version", self.dont_notify_about_this_version) self.config.set("dialogflags", "ask_about_usage_stats", self.ask_about_usage_stats) diff --git a/comictaggerlib/taggerwindow.py b/comictaggerlib/taggerwindow.py index 9aaf9c5..74c2212 100644 --- a/comictaggerlib/taggerwindow.py +++ b/comictaggerlib/taggerwindow.py @@ -261,6 +261,23 @@ Have fun! ) self.settings.show_disclaimer = not checked + if self.settings.settings_warning < 4: + checked = OptionalMessageDialog.msg( + self, + "Warning!", + f""" +{" "*100} +The next release will save settings in a different format +no settings will be transfered to the new version.
+See https://github.com/comictagger/comictagger/releases/1.5.5 +for more information +

+You have {4-self.settings.settings_warning} warnings left. +
""", + ) + if checked: + self.settings.settings_warning += 1 + if self.settings.check_for_new_version: self.check_latest_version_online()