From 9c5430dcfd7541818b7f067e4034f8c2a0e3094c Mon Sep 17 00:00:00 2001 From: Pierre Ynard Date: Tue, 2 Feb 2016 03:19:34 +0100 Subject: [PATCH] vimeo.lua: update to website changes --- share/lua/playlist/vimeo.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/share/lua/playlist/vimeo.lua b/share/lua/playlist/vimeo.lua index 1143d31728..d9eed17012 100644 --- a/share/lua/playlist/vimeo.lua +++ b/share/lua/playlist/vimeo.lua @@ -37,10 +37,18 @@ function parse() while true do local line = vlc.readline() if not line then break end - path = string.match( line, "data%-config%-url=\"(.-)\"" ) - if path then - path = vlc.strings.resolve_xml_special_chars( path ) - return { { path = path } } + + -- Get the appropriate ubiquitous meta tag. It appears twice: + -- + -- + local meta = string.match( line, "(]- property=\"og:video:url\"[^>]->)" ) + if meta then + local path = string.match( meta, " content=\"(.-)\"" ) + -- Exclude moogaloop flash URL + if path and string.match( path, "player%.vimeo%.com" ) then + path = vlc.strings.resolve_xml_special_chars( path ) + return { { path = path } } + end end end -- GitLab