Commit 447578df authored by Pierre Ynard's avatar Pierre Ynard

youtube.lua: partial fix for format matching

Stereoscopic formats would get mistakenly selected
(cherry picked from commit 0d4e2968)
Signed-off-by: default avatarPierre Ynard <linkfanel@yahoo.fr>
parent 61a7b001
......@@ -119,7 +119,7 @@ function parse()
if url_map then
-- FIXME: do this properly
url_map = string.gsub( url_map, "\\u0026", "&" )
for url,itag in string.gmatch( url_map, "url=([^&,]+).-&itag=(%d+)" ) do
for url,itag in string.gmatch( url_map, "url=([^&,]+)[^,]*&itag=(%d+)" ) do
-- Apparently formats are listed in quality order,
-- so we can afford to simply take the first one
if not fmt or tonumber( itag ) == tonumber( fmt ) then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment