fix check max_resolution in TOR mode

This commit is contained in:
Jesús 2021-08-02 18:27:27 -05:00
parent f27105fa7f
commit cb9b6dadbd
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -33,7 +33,7 @@ def get_video_sources(info, tor_bypass=False):
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['width'] <= max_resolution:
video_sources.append({
'src': fmt['url'],
'type': 'video/' + fmt['ext'],