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

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