refactor(utils): expose is_original/is_default on parsed formats

parse_media_format now derives is_original / is_default from the
format_note markers, consistent with is_60fps / is_hdr. Lets the format
matchers stop doing raw substring checks on format_note.

Refs #1468
This commit is contained in:
masterdot
2026-09-07 19:54:56 +02:00
parent f485740e3a
commit 97082928a1

View File

@@ -342,6 +342,10 @@ def parse_media_format(format_dict):
'asr': format_dict.get('asr', 0),
'is_60fps': fps > 50,
'is_hdr': 'HDR' in format_dict.get('format', '').upper(),
# yt-dlp appends "(original)" / "(default)" to format_note for videos
# that publish more than one audio track
'is_original': '(original)' in format_dict.get('format_note', ''),
'is_default': '(default)' in format_dict.get('format_note', ''),
'is_hls': is_hls,
'is_dash': is_dash,
}