Merge pull request #1358 from tcely/patch-10
Exclude formats with '-sr' from video selection
This commit is contained in:
@@ -118,6 +118,8 @@ def get_best_video_format(media):
|
|||||||
continue
|
continue
|
||||||
if not fmt['vcodec']:
|
if not fmt['vcodec']:
|
||||||
continue
|
continue
|
||||||
|
if '-sr' in fmt['id']:
|
||||||
|
continue
|
||||||
if any(key[0] not in fmt for key in sort_keys):
|
if any(key[0] not in fmt for key in sort_keys):
|
||||||
continue
|
continue
|
||||||
if media.source.source_resolution.strip().upper() == fmt['format']:
|
if media.source.source_resolution.strip().upper() == fmt['format']:
|
||||||
@@ -133,6 +135,8 @@ def get_best_video_format(media):
|
|||||||
# If the format has an audio stream, skip it
|
# If the format has an audio stream, skip it
|
||||||
if fmt['acodec'] is not None:
|
if fmt['acodec'] is not None:
|
||||||
continue
|
continue
|
||||||
|
if '-sr' in fmt['id']:
|
||||||
|
continue
|
||||||
if (fmt['height'] <= media.source.source_resolution_height and
|
if (fmt['height'] <= media.source.source_resolution_height and
|
||||||
fmt['height'] >= min_height):
|
fmt['height'] >= min_height):
|
||||||
video_formats.append(fmt)
|
video_formats.append(fmt)
|
||||||
|
|||||||
Reference in New Issue
Block a user