1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-21 07:16:56 +00:00

ytdl_hook: pre-append id-only playlist items with shortened youtube URL

This commit is contained in:
Ricardo Constantino 2018-01-29 21:39:12 +00:00
parent 2a0f9fc158
commit 93403b13a4
No known key found for this signature in database
GPG Key ID: EFD16019AE4FF531

View File

@ -570,7 +570,7 @@ mp.add_hook(o.try_ytdl_first and "on_load" or "on_load_fail", 10, function ()
-- links with only youtube id as returned by --flat-playlist
if not site:find("://") then
table.insert(playlist, "ytdl://" .. site)
table.insert(playlist, "https://youtu.be/" .. site)
elseif url_is_safe(site) then
table.insert(playlist, site)
end