feat(dl): Add *new* --workers to set download threads/workers

The previously named --workers which is now --downloads specified how many tracks to download, not how many threads/workers are used per-download.

It defaults to nothing, which each downloader then has their own defaults. All current downloaders though currently default to `min(32, (os.cpu_count() or 1) + 4)`, which is also the default for `ThreadPoolExecutor` in general.

This also brings a side effect of changing DASH and HLS's forced max_workers of 16 to now a more appropriate default but more importantly actually configurable. You can set a default in your config under `dl.workers`.
This commit is contained in:
rlaphoenix
2024-04-02 23:42:37 +01:00
parent 0cf20f84a9
commit 10285c3819
6 changed files with 22 additions and 4 deletions

View File

@@ -153,6 +153,13 @@ For example to set the default primary language to download to German,
lang: de
```
to set how many tracks to download concurrently to 4 and download threads to 16,
```yaml
downloads: 4
workers: 16
```
to set `--bitrate=CVBR` for the AMZN service,
```yaml