Merge pull request #931 from danielmawhirter/patch-2
Some checks are pending
CI / info (push) Waiting to run
CI / test (3.10) (push) Waiting to run
CI / test (3.11) (push) Waiting to run
CI / test (3.12) (push) Waiting to run
CI / test (3.8) (push) Waiting to run
CI / test (3.9) (push) Waiting to run
CI / containerise (push) Blocked by required conditions

Fix video format sorting in case of missing keys
This commit is contained in:
meeb 2025-04-08 14:39:44 +10:00 committed by GitHub
commit 919a3d0f2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -95,6 +95,8 @@ def get_best_video_format(media):
continue
if not fmt['vcodec']:
continue
if any(key[0] not in fmt for key in sort_keys):
continue
if media.source.source_resolution.strip().upper() == fmt['format']:
video_formats.append(fmt)
elif media.source.source_resolution_height == fmt['height']: