Exclude formats with '-sr' from video selection

Skip formats with '-sr' in their ID when matching video formats.
This commit is contained in:
tcely
2026-01-10 13:29:28 -05:00
committed by GitHub
parent a41753bb2a
commit 05bb8188dc

View File

@@ -118,6 +118,8 @@ def get_best_video_format(media):
continue
if not fmt['vcodec']:
continue
if '-sr' in fmt['id']:
continue
if any(key[0] not in fmt for key in sort_keys):
continue
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 fmt['acodec'] is not None:
continue
if '-sr' in fmt['id']:
continue
if (fmt['height'] <= media.source.source_resolution_height and
fmt['height'] >= min_height):
video_formats.append(fmt)