From 5f42b8419e96d51b54fd76d220a923212c68a8af Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Thu, 9 Nov 2023 01:39:03 +1100 Subject: [PATCH] downloader: Hard-code source quality for non-twitch providers since they can't do any other quality, but we still want to be able to set other qualities for twitch streams. Really qualities should be per-channel but I'm being lazy. --- downloader/downloader/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/downloader/downloader/main.py b/downloader/downloader/main.py index 2fb5dee..bf7377b 100644 --- a/downloader/downloader/main.py +++ b/downloader/downloader/main.py @@ -639,15 +639,18 @@ def main(channels, base_dir=".", qualities="source", metrics_port=8001, backdoor managers = [] for channel, important, type, url in channels: + channel_qualities = qualities if type == "twitch": provider = TwitchProvider(channel, auth_token=twitch_auth_token) elif type == "url": provider = URLProvider(url) + channel_qualities = ["source"] elif type == "youtube": provider = YoutubeProvider(url) + channel_qualities = ["source"] else: raise ValueError(f"Unknown type {type!r}") - manager = StreamsManager(provider, channel, base_dir, qualities, important=important) + manager = StreamsManager(provider, channel, base_dir, channel_qualities, important=important) managers.append(manager) def stop():