diff --git a/tubearchivist/home/config.json b/tubearchivist/home/config.json index 502ceda..50e69d9 100644 --- a/tubearchivist/home/config.json +++ b/tubearchivist/home/config.json @@ -19,7 +19,8 @@ "sleep_interval": 3, "format": false, "add_metadata": false, - "add_thumbnail": false + "add_thumbnail": false, + "throttledratelimit": false }, "application": { "app_root": "/app", diff --git a/tubearchivist/home/src/download.py b/tubearchivist/home/src/download.py index e8d96e5..3f03a85 100644 --- a/tubearchivist/home/src/download.py +++ b/tubearchivist/home/src/download.py @@ -515,6 +515,11 @@ class VideoDownloader: obs["format"] = self.config["downloads"]["format"] if self.config["downloads"]["limit_speed"]: obs["ratelimit"] = self.config["downloads"]["limit_speed"] * 1024 + + throttle = self.config["downloads"]["throttledratelimit"] + if throttle: + obs["throttledratelimit"] = throttle * 1024 + external = False if external: obs["external_downloader"] = "aria2c" diff --git a/tubearchivist/home/templates/home/settings.html b/tubearchivist/home/templates/home/settings.html index eea5fdb..9dab509 100644 --- a/tubearchivist/home/templates/home/settings.html +++ b/tubearchivist/home/templates/home/settings.html @@ -53,6 +53,11 @@ Limit download speed. 0 (zero) to deactivate.
KB/sec +
+

Current throttled rate limit: {{ config.downloads.throttledratelimit }}

+ Assume the download is being throttled below this speed and restart. 0 (zero) to deactivate, e.g. 100KB/sec
+ KB/sec +

Current scraping sleep interval: {{ config.downloads.sleep_interval }}

Seconds to sleep between calls to YouTube. Might be necessary to avoid throttling. Recommended 3.