From 7a93acabb3f5a8dd95ec0d56ae57cc34eb57c1b8 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Fri, 6 Sep 2019 15:00:18 -0700 Subject: Always use 360p in non-theater mode --- youtube/watch.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'youtube') diff --git a/youtube/watch.py b/youtube/watch.py index 8f83e48..41c90e4 100644 --- a/youtube/watch.py +++ b/youtube/watch.py @@ -51,8 +51,13 @@ def watch_page_related_playlist_info(item): def get_video_sources(info): video_sources = [] + if not settings.theater_mode: + max_resolution = 360 + else: + max_resolution = settings.default_resolution + for format in info['formats']: - if format['acodec'] != 'none' and format['vcodec'] != 'none' and format['height'] <= settings.default_resolution: + if format['acodec'] != 'none' and format['vcodec'] != 'none' and format['height'] <= max_resolution: video_sources.append({ 'src': format['url'], 'type': 'video/' + format['ext'], -- cgit v1.2.3