aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/watch.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube/watch.py')
-rw-r--r--youtube/watch.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube/watch.py b/youtube/watch.py
index ce1637b..47a93bf 100644
--- a/youtube/watch.py
+++ b/youtube/watch.py
@@ -29,7 +29,8 @@ def get_video_sources(info):
for fmt in info['formats']:
if not all(fmt[attr] for attr in ('quality', 'width', 'ext', 'url')):
continue
- if fmt['acodec'] and fmt['vcodec'] and fmt['height'] <= max_resolution:
+ if (fmt['acodec'] and fmt['vcodec']
+ and fmt['quality'] <= max_resolution):
video_sources.append({
'src': fmt['url'],
'type': 'video/' + fmt['ext'],