[vlc-commits] youtube.lua: update video format selection to website changes
Pierre Ynard
git at videolan.org
Tue Nov 21 22:23:22 CET 2017
vlc/vlc-2.2 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Tue Nov 21 21:59:35 2017 +0100| [a7551fde543cd3fcd3eb5d7d9b9afa948aa1676b] | committer: Pierre Ynard
youtube.lua: update video format selection to website changes
The format of the Youtube API parameters used to list the available
video resolutions changed slightly. This fixes usage of the
--preferred-resolution option.
(cherry picked from commit 75391aa0670790d5dc87af0d407765f50bff8eab)
Signed-off-by: Pierre Ynard <linkfanel at yahoo.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=a7551fde543cd3fcd3eb5d7d9b9afa948aa1676b
---
share/lua/playlist/youtube.lua | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index b386d90b7f..30e3582843 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -1,7 +1,7 @@
--[[
$Id$
- Copyright © 2007-2015 the VideoLAN team
+ Copyright © 2007-2017 the VideoLAN team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@ function get_fmt( fmt_list )
end
local fmt = nil
- for itag,height in string.gmatch( fmt_list, "(%d+)/%d+x(%d+)/[^,]+" ) do
+ for itag,height in string.gmatch( fmt_list, "(%d+)/%d+x(%d+)[^,]*" ) do
-- Apparently formats are listed in quality
-- order, so we take the first one that works,
-- or fallback to the lowest quality
More information about the vlc-commits
mailing list