1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-11 08:37:59 +00:00

ytdl_hook: reverse thumbnail order

ytdl lists thumbnails in ascending order according to height/preference.
all_formats=yes adds formats from best to worst, so the same should also
be done for thumbnails.
This commit is contained in:
Christoph Heinrich 2023-10-24 01:13:28 +02:00 committed by Dudemanguy
parent 21609953cc
commit 612faed856

View File

@ -761,7 +761,8 @@ local function add_single_video(json)
local thumb_height = -1
local thumb_preference = nil
for _, thumb_info in ipairs(json.thumbnails) do
for i = #json.thumbnails, 1, -1 do
local thumb_info = json.thumbnails[i]
if not (thumb_info.url == nil) then
if (o.thumbnails == 'all') then
msg.verbose("adding thumbnail")