From f59d3505a898ca8db31c329ccf90668ca7a8387d Mon Sep 17 00:00:00 2001 From: lededev Date: Thu, 14 Apr 2022 04:50:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E-D=20--download-images=20?= =?UTF-8?q?=E6=80=BB=E6=98=AF=E4=B8=8B=E8=BD=BD=E5=9B=BE=E7=89=87=E5=BC=80?= =?UTF-8?q?=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Movie_Data_Capture.py | 4 ++++ config.py | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Movie_Data_Capture.py b/Movie_Data_Capture.py index c5587bc..6291f87 100644 --- a/Movie_Data_Capture.py +++ b/Movie_Data_Capture.py @@ -74,6 +74,8 @@ def argparse_function(ver: str) -> typing.Tuple[str, str, str, str, bool, bool]: help="No network query, do not get metadata, for cover cropping purposes, only takes effect when main mode is 3.") parser.add_argument("-w", "--website", dest='site', default='', nargs='?', help="Override [priority]website= in config.") + parser.add_argument("-D", "--download-images", dest='dnimg', action="store_true", + help="Override [common]download_only_missing_images=0 force invoke image downloading.") parser.add_argument("-z", "--zero-operation", dest='zero_op', action="store_true", help="""Only show job list of files and numbers, and **NO** actual operation is performed. It may help you correct wrong numbers before real job.""") @@ -100,6 +102,8 @@ is performed. It may help you correct wrong numbers before real job.""") config.G_conf_override["debug_mode:switch"] = get_bool_or_none(args.debug) config.G_conf_override["common:rerun_delay"] = get_str_or_none(args.delaytm) config.G_conf_override["priority:website"] = get_str_or_none(args.site) + if get_bool_or_none(args.dnimg): + config.G_conf_override["common:download_only_missing_images"] = False no_net_op = False if conf.main_mode() == 3: diff --git a/config.py b/config.py index 5fcd113..6f129f5 100644 --- a/config.py +++ b/config.py @@ -20,7 +20,8 @@ G_conf_override = { "common:rerun_delay": None, "debug_mode:switch": None, "face:aways_imagecut": None, - "priority:website" : None + "priority:website": None, + "common:download_only_missing_images": None } @@ -170,7 +171,7 @@ class Config: return self.getboolean_override("common", "ignore_failed_list") def download_only_missing_images(self) -> bool: - return self.conf.getboolean("common", "download_only_missing_images") + return self.getboolean_override("common", "download_only_missing_images") def mapping_table_validity(self) -> int: return self.conf.getint("common", "mapping_table_validity")