Skip to content

Commit

Permalink
vimeo.lua: update for website changes
Browse files Browse the repository at this point in the history
  • Loading branch information
linkfanel committed Dec 14, 2016
1 parent 1afb09a commit 73d3b86
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions share/lua/playlist/vimeo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,12 @@ function parse()
local line = vlc.readline()
if not line then break end

-- Get the appropriate ubiquitous meta tag. It appears twice:
-- <meta property="og:video:url" content="https://player.vimeo.com/video/123456789?autoplay=1">
-- <meta property="og:video:url" content="https://vimeo.com/moogaloop.swf?clip_id=123456789&amp;autoplay=1">
local meta = string.match( line, "(<meta[^>]- property=\"og:video:url\"[^>]->)" )
-- Get the appropriate ubiquitous meta tag
-- <meta name="twitter:player" content="https://player.vimeo.com/video/123456789">
local meta = string.match( line, "(<meta[^>]- name=\"twitter:player\"[^>]->)" )
if meta then
local path = string.match( meta, " content=\"(.-)\"" )
-- Exclude moogaloop flash URL
if path and string.match( path, "player%.vimeo%.com" ) then
if path then
path = vlc.strings.resolve_xml_special_chars( path )
return { { path = path } }
end
Expand Down

0 comments on commit 73d3b86

Please sign in to comment.