[vlc-commits] youtube.lua: fix alternate video info API parameters

Pierre Ynard git at videolan.org
Sun Dec 1 12:07:09 CET 2019


vlc/vlc-3.0 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sun Dec  1 11:53:51 2019 +0100| [690de354a9d83a8535826287fe4fc1b02a4d22ac] | committer: Pierre Ynard

youtube.lua: fix alternate video info API parameters

Passing a different value hasn't worked anymore for a while now, with
the API always returning an "invalid parameter" error. This restores at
least some functionality.

(cherry picked from commit 5e024d8689291480e4adb86a9d806387461075f8)
Signed-off-by: Pierre Ynard <linkfanel at yahoo.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=690de354a9d83a8535826287fe4fc1b02a4d22ac
---

 share/lua/playlist/youtube.lua | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index cc1386d56d..6615637ad7 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -401,9 +401,9 @@ function parse()
             if video_id then
                 -- Passing no "el" parameter to /get_video_info seems to
                 -- let it default to "embedded", and both known values
-                -- of "embedded" and "detailpage" are wrong and fail for
-                -- various restricted videos, so we pass a different value
-                path = vlc.access.."://www.youtube.com/get_video_info?video_id="..video_id.."&el=detail"..copy_url_param( vlc.path, "fmt" )
+                -- of "embedded" and "detailpage" have historically been
+                -- wrong and failed for various restricted videos.
+                path = vlc.access.."://www.youtube.com/get_video_info?video_id="..video_id..copy_url_param( vlc.path, "fmt" )
                 vlc.msg.warn( "Couldn't extract video URL, falling back to alternate youtube API" )
             end
         end



More information about the vlc-commits mailing list