[vlc-commits] youtube.lua: update video format selection to website changes

Pierre Ynard git at videolan.org
Tue Nov 21 22:16:17 CET 2017


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Tue Nov 21 21:59:35 2017 +0100| [75391aa0670790d5dc87af0d407765f50bff8eab] | 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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=75391aa0670790d5dc87af0d407765f50bff8eab
---

 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 7b63f91fa8..fc9a68c483 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -1,7 +1,7 @@
 --[[
  $Id$
 
- Copyright © 2007-2016 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
@@ -50,7 +50,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