mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-12-22 18:00:17 +00:00
implementing throttled-rate option
This commit is contained in:
parent
581314a8a4
commit
5f3fc460c1
@ -19,7 +19,8 @@
|
||||
"sleep_interval": 3,
|
||||
"format": false,
|
||||
"add_metadata": false,
|
||||
"add_thumbnail": false
|
||||
"add_thumbnail": false,
|
||||
"throttledratelimit": false
|
||||
},
|
||||
"application": {
|
||||
"app_root": "/app",
|
||||
|
@ -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"
|
||||
|
@ -53,6 +53,11 @@
|
||||
<i>Limit download speed. 0 (zero) to deactivate.</i><br>
|
||||
<input type="number" name="downloads.limit_speed" id="downloads.limit_speed"><span>KB/sec</span>
|
||||
</div>
|
||||
<div class="settings-item">
|
||||
<p>Current throttled rate limit: <span class="settings-current">{{ config.downloads.throttledratelimit }}</span></p>
|
||||
<i>Assume the download is being throttled below this speed and restart. 0 (zero) to deactivate, e.g. 100KB/sec</i><br>
|
||||
<input type="number" name="downloads.throttledratelimit" id="downloads.throttledratelimit"><span>KB/sec</span>
|
||||
</div>
|
||||
<div class="settings-item">
|
||||
<p>Current scraping sleep interval: <span class="settings-current">{{ config.downloads.sleep_interval }}</p>
|
||||
<i>Seconds to sleep between calls to YouTube. Might be necessary to avoid throttling. Recommended 3.</i><br>
|
||||
|
Loading…
Reference in New Issue
Block a user