Skip to content

Bulk asynchronous downloader for multiple file hosts

feat: add `--update-check` option

NTFSvolumeee3a1cc893de
diff --git a/cyberdrop_dl/commands/scrape.py b/cyberdrop_dl/commands/scrape.py
index 2de2c5f6d..a00418c27 100644
--- a/cyberdrop_dl/commands/scrape.py
+++ b/cyberdrop_dl/commands/scrape.py
@@ -83,6 +83,9 @@ async def _post_runtime(manager: Manager) -> None:
async def _check_for_updates(manager: Manager) -> None:
+ if not manager.config.update_check:
+ return
+
from cyberdrop_dl.updates import check_latest_pypi
log_spacer()
diff --git a/cyberdrop_dl/config/__init__.py b/cyberdrop_dl/config/__init__.py
index 7cbc12f45..b8d297f9c 100644
--- a/cyberdrop_dl/config/__init__.py
+++ b/cyberdrop_dl/config/__init__.py
@@ -119,6 +119,8 @@ class Config(ConfigModel, title="cyberdrop-dl config"):
sort: Sort = Field(default_factory=Sort)
subfolders: SubFolders = Field(default_factory=SubFolders)
ui: UIOptions = Field(default_factory=UIOptions)
+ update_check: Annotated[bool, Parameter(alias=("-U"))] = True
+ "Check for updates at the end of the session"
_resolved: bool = False
_sources: tuple[Path, ...] = ()
diff --git a/cyberdrop_dl/config/default.yaml b/cyberdrop_dl/config/default.yaml
index dcd000b57..6c36341a7 100644
--- a/cyberdrop_dl/config/default.yaml
+++ b/cyberdrop_dl/config/default.yaml
@@ -221,3 +221,4 @@ ui:
portrait: false
refresh_rate: 10.0
show_stats: true
+update_check: true
diff --git a/cyberdrop_dl/config/schema.json b/cyberdrop_dl/config/schema.json
index 52710933d..06cfe2e31 100644
--- a/cyberdrop_dl/config/schema.json
+++ b/cyberdrop_dl/config/schema.json
@@ -1512,6 +1512,11 @@
},
"ui": {
"$ref": "#/$defs/UIOptions"
+ },
+ "update_check": {
+ "default": true,
+ "title": "Update Check",
+ "type": "boolean"
}
},
"title": "cyberdrop-dl config",
diff --git a/docs/reference/config/general.md b/docs/reference/config/general.md
index 2584f5be3..c4c735f9b 100644
--- a/docs/reference/config/general.md
+++ b/docs/reference/config/general.md
@@ -370,3 +370,11 @@ max_thread_folder_depth: null
├── thread_12
└── thread_08
```
+
+# `update_check`
+
+| Type | Default |
+| ------ | ------- |
+| `bool` | `True` |
+
+Check for updates at the end of the session