diff options
author | James Taylor <user234683@users.noreply.github.com> | 2019-09-06 15:00:18 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2019-09-06 15:00:18 -0700 |
commit | 7a93acabb3f5a8dd95ec0d56ae57cc34eb57c1b8 (patch) | |
tree | f86c2871dfded00c76bc408582f1083408432fda | |
parent | ed066e7414ebb5b0cee9ce6458d96e73513defbe (diff) | |
download | yt-local-7a93acabb3f5a8dd95ec0d56ae57cc34eb57c1b8.tar.lz yt-local-7a93acabb3f5a8dd95ec0d56ae57cc34eb57c1b8.tar.xz yt-local-7a93acabb3f5a8dd95ec0d56ae57cc34eb57c1b8.zip |
Always use 360p in non-theater mode
-rw-r--r-- | youtube/watch.py | 7 |
1 files changed, 6 insertions, 1 deletions
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'], |