diff options
-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'], |