Skip to content

Bulk asynchronous downloader for multiple file hosts

Simplify documenting runtime arguments (#471)

Arkadiy Illarionov55df09fa3e30
diff --git a/cyberdrop_dl/base_functions/config_manager.py b/cyberdrop_dl/base_functions/config_manager.py
index da383f936..8dc7c266f 100644
--- a/cyberdrop_dl/base_functions/config_manager.py
+++ b/cyberdrop_dl/base_functions/config_manager.py
@@ -78,18 +78,10 @@ async def document_args(args: Dict) -> None:
"""We document the runtime arguments for debugging and troubleshooting, redacting sensitive information"""
print_args = copy.deepcopy(args)
- for group in print_args.values():
+ log("Starting Cyberdrop-DL")
+ for group_name, group in print_args.items():
+ args_type = group_name.replace('_', ' ').lower()
for arg in group:
if group[arg] is not None and any(s in arg for s in ('api_key', 'password')):
group[arg] = '!REDACTED!'
-
- log("Starting Cyberdrop-DL")
- log(f"Using authentication arguments: {print_args['Authentication']}", quiet=True)
- log(f"Using file arguments: {print_args['Files']}", quiet=True)
- log(f"Using forum option arguments: {print_args['Forum_Options']}", quiet=True)
- log(f"Using ignore arguments: {print_args['Ignore']}", quiet=True)
- log(f"Using jdownloader arguments: {print_args['JDownloader']}", quiet=True)
- log(f"Using progress option arguments: {print_args['Progress_Options']}", quiet=True)
- log(f"Using ratelimiting arguments: {print_args['Ratelimiting']}", quiet=True)
- log(f"Using runtime arguments: {print_args['Runtime']}", quiet=True)
- log(f"Using sorting arguments: {print_args['Sorting']}", quiet=True)
+ log(f"Using {args_type} arguments: {group}", quiet=True)