Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
feat: add `--print-stats` CLI only option
NTFSvolume97d9efd1e66d
diff --git a/cyberdrop_dl/main.py b/cyberdrop_dl/main.pyindex 6a9f79b3c..e0edc0e2f 100644--- a/cyberdrop_dl/main.py+++ b/cyberdrop_dl/main.py@@ -243,7 +243,6 @@ async def director(manager: Manager) -> None:await runtime(manager)await post_runtime(manager)- log_spacer(20)manager.progress_manager.print_stats(start_time)if not configs_to_run:diff --git a/cyberdrop_dl/managers/progress_manager.py b/cyberdrop_dl/managers/progress_manager.pyindex 407a2800f..ddc21e65a 100644--- a/cyberdrop_dl/managers/progress_manager.py+++ b/cyberdrop_dl/managers/progress_manager.py@@ -79,10 +79,13 @@ class ProgressManager:def print_stats(self, start_time: float) -> None:"""Prints the stats of the program."""+ if not self.manager.parsed_args.cli_only_args.print_stats:+ returnend_time = time.perf_counter()runtime = timedelta(seconds=int(end_time - start_time))data_size = ByteSize(self.file_progress.downloaded_data).human_readable(decimal=True)+ log_spacer(20)log("Printing Stats...\n", 20)log_cyan(f"Run Stats (config: {self.manager.config_manager.loaded_config}):")log_yellow(f" Total Runtime: {runtime}")diff --git a/cyberdrop_dl/utils/args.py b/cyberdrop_dl/utils/args.pyindex 59e6f04c1..4d9e9c447 100644--- a/cyberdrop_dl/utils/args.py+++ b/cyberdrop_dl/utils/args.py@@ -43,6 +43,7 @@ class CommandLineOnlyArgs(BaseModel):False, description="retry download of maintenance files (bunkr). Requires files to be hashed")download_tiktok_audios: bool = Field(False, description="download TikTok audios")+ print_stats: bool = Field(True, description="Show stats report at the end of a run")@computed_field@property