summaryrefslogtreecommitdiffstats
path: root/player/lua
diff options
context:
space:
mode:
authorChristoph Heinrich <christoph.heinrich@student.tugraz.at>2023-11-05 21:54:01 +0100
committerDudemanguy <random342@airmail.cc>2023-11-06 14:59:05 +0000
commitbcbd821fa9ff6b1128801b240f22541e1cd76555 (patch)
tree22e6895979547fadd34cc61a202dade2a20094f7 /player/lua
parentd9b33dd79ad1f5e0ea7b4a44592e73c905f81ece (diff)
downloadmpv-bcbd821fa9ff6b1128801b240f22541e1cd76555.tar.bz2
mpv-bcbd821fa9ff6b1128801b240f22541e1cd76555.tar.xz
ytdl_hook: fix mixed thumbnail.preference availability
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/ytdl_hook.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
index d706568fe9..3161da6194 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -768,7 +768,7 @@ local function add_single_video(json)
msg.verbose("adding thumbnail")
mp.commandv("video-add", thumb_info.url, "auto")
thumb_height = 0
- elseif (thumb_preference ~= nil and thumb_info.preference > thumb_preference) or
+ elseif (thumb_preference ~= nil and (thumb_info.preference or -math.huge) > thumb_preference) or
(thumb_preference == nil and ((thumb_info.height or 0) > thumb_height)) then
thumb = thumb_info.url
thumb_height = thumb_info.height or 0