Skip to content
Snippets Groups Projects
Commit 0d4e2968 authored by Pierre Ynard's avatar Pierre Ynard
Browse files

youtube.lua: partial fix for format matching

Stereoscopic formats would get mistakenly selected
parent aba13572
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment