summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorChristoph Heinrich <christoph.heinrich@student.tugraz.at>2022-07-10 20:07:50 +0200
committerDudemanguy <random342@airmail.cc>2022-08-12 14:31:59 +0000
commit813dfe19242bc7672470077cc37c373f92730e05 (patch)
treed6f3aa872ad93a69023e91c326e48fc612c16592 /DOCS
parenta3b2d3f9308e763a100d0359749c3691dcb2ab0f (diff)
downloadmpv-813dfe19242bc7672470077cc37c373f92730e05.tar.bz2
mpv-813dfe19242bc7672470077cc37c373f92730e05.tar.xz
ytdl_hook: fix default track for single format
Tracks are marked as default tracks based on what yt-dlp/youtube-dl returns in the field `requested_formats`. The problem is that this field only exists when there is more then one requested format. So `ytdl-format=bestvideo+bestaudio` would have that field, but `ytdl-format=bestaudio` would not, leading to no tracks being marked as default tracks. The requested formats can also be found under `requested_downloads`, which exists regardless of the number of requested formats. However when there is more then one requested format, `requested_downloads` doesn't contain those formats directly and instead has a field `requested_formats` that is identical to the other `requested_formats`. Therefore use `requested_downloads` as a fallback for when `requested_formats` doesn't exist.
Diffstat (limited to 'DOCS')
0 files changed, 0 insertions, 0 deletions