diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index e9a7b3aac7..586d4ea874 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -507,7 +507,7 @@ local function add_single_video(json) if requested_formats then for _, track in pairs(requested_formats) do - max_bitrate = track.tbr > max_bitrate and + max_bitrate = (track.tbr and track.tbr > max_bitrate) and track.tbr or max_bitrate end elseif json.tbr then