refactor(Track): Rename extra to data, enforce type as dict

Setting data as a dictionary allows more places of code (including DASH, HLS, Services, etc) to get/set what they want by key instead of typically by index (list/tuple). Tuples or lists were typically in services because DASH and HLS stored needed data as a tuple and services did not want to interrupt or remove that data, even though it would be fine.
This commit is contained in:
rlaphoenix
2024-03-01 04:29:45 +00:00
parent a6a5699577
commit 90c544966a
3 changed files with 20 additions and 5 deletions

View File

@@ -207,7 +207,12 @@ class DASH:
language=track_lang,
is_original_lang=language and is_close_match(track_lang, [language]),
descriptor=Video.Descriptor.DASH,
extra=(rep, adaptation_set),
data={
"dash": {
"representation": rep,
"adaptation_set": adaptation_set
}
},
**track_args
))