From ea945a6b2ac450c7c74c354c8eb7eafc38ef8650 Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Tue, 18 Mar 2025 19:57:06 -0700 Subject: [PATCH] Don't allow cr tags to be disabled if it's the only tags available --- comictaggerlib/ctsettings/commandline.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/comictaggerlib/ctsettings/commandline.py b/comictaggerlib/ctsettings/commandline.py index f1adb53..96219dd 100644 --- a/comictaggerlib/ctsettings/commandline.py +++ b/comictaggerlib/ctsettings/commandline.py @@ -283,7 +283,13 @@ def validate_commandline_settings(config: settngs.Config[ct_ns], parser: settngs + "Distributed under Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n", ) - if not config[0].Metadata_Options__cr and "cr" in comicarchive.tags and comicarchive.tags["cr"].enabled: + enabled_tags = {tag for tag in comicarchive.tags if comicarchive.tags[tag].enabled} + if ( + (not config[0].Metadata_Options__cr) + and "cr" in comicarchive.tags + and comicarchive.tags["cr"].enabled + and len(enabled_tags) > 1 + ): comicarchive.tags["cr"].enabled = False config[0].Runtime_Options__no_gui = any(