[vlc-devel] [PATCH] vimeo.lua: Detect stream URLs from renewed Vimeo player page.
Richard Falcema
richard at falcema.com
Fri Nov 9 21:12:48 CET 2018
vimeo.lua module doesn’t seem to be working properly on player.vimeo.com due to the renewal of Vimeo.
This patch fixes the issue.
---
share/lua/playlist/vimeo.lua | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/share/lua/playlist/vimeo.lua b/share/lua/playlist/vimeo.lua
index c6362660f4..160eda5281 100644
--- a/share/lua/playlist/vimeo.lua
+++ b/share/lua/playlist/vimeo.lua
@@ -61,6 +61,14 @@ function parse()
local prefres = vlc.var.inherit(nil, "preferred-resolution")
local bestres = nil
local line = vlc.readline() -- data is on one line only
+
+ if not string.match( line, "{([^}]*\"profile\":[^}]*)}" ) then
+ while true do
+ line = vlc.readline()
+ if string.match( line, "{([^}]*\"profile\":[^}]*)}" ) then break end
+ if not line then break end
+ end
+ end
for stream in string.gmatch( line, "{([^}]*\"profile\":[^}]*)}" ) do
local url = string.match( stream, "\"url\":\"(.-)\"" )
--
2.14.3
More information about the vlc-devel
mailing list