[dl:http] implement dynamic download 'rate' limits (#7638)

This commit is contained in:
Mike Fährmann
2025-06-08 18:10:47 +02:00
parent e84df260c0
commit a25e14e776
6 changed files with 30 additions and 13 deletions

View File

@@ -5972,11 +5972,15 @@ Description
downloader.*.rate
-----------------
Type
``string``
* ``string``
* ``list`` with 2 ``strings``
Default
``null``
Example
``"32000"``, ``"500k"``, ``"2.5M"``
* ``"32000"``
* ``"500k"``
* ``"1M - 2.5M"``
* ``["1M", "2.5M"]``
Description
Maximum download rate in bytes per second.
@@ -5984,6 +5988,10 @@ Description
optionally followed by one of ``k``, ``m``. ``g``, ``t``, or ``p``.
These suffixes are case-insensitive.
If given as a range, the maximum download rate
will be randomly chosen before each download.
(see `random.randint() <https://docs.python.org/3/library/random.html#random.randint>`_)
downloader.*.retries
--------------------

View File

@@ -77,7 +77,8 @@
--no-check-certificate Disable HTTPS certificate validation
## Downloader Options:
-r, --limit-rate RATE Maximum download rate (e.g. 500k or 2.5M)
-r, --limit-rate RATE Maximum download rate (e.g. 500k, 2.5M, or
800k-2M)
--chunk-size SIZE Size of in-memory data chunks (default: 32k)
--sleep SECONDS Number of seconds to wait before each download.
This can be either a constant value or a range