Commit b922b655 authored by Cheng Sun's avatar Cheng Sun Committed by Jean-Baptiste Kempf

lua vimeo playlist: no need to parse vlc.path more than once

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit cc56ca3a2afd1c9a1f5f6ed3e42b7f567c2a8bc5)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 9009035d
......@@ -51,6 +51,8 @@ function parse()
if string.match ( vlc.path, "vimeo.com/moogaloop" ) then
prefres = get_prefres()
ishd = false
-- Try to find id of the video
_,_,id = string.find (vlc.path, "vimeo.com/moogaloop/load/clip:(.*)/local/")
while true do
-- Try to find the video's title
line = vlc.readline()
......@@ -58,8 +60,6 @@ function parse()
if string.match( line, "<caption>(.*)</caption>" ) then
_,_,name = string.find (line, "<caption>(.*)</caption>" )
end
-- Try to find id of the video
_,_,id = string.find (vlc.path, "vimeo.com/moogaloop/load/clip:(.*)/local/")
-- Try to find image for thumbnail
if string.match( line, "<thumbnail>(.*)</thumbnail>" ) then
_,_,arturl = string.find (line, "<thumbnail>(.*)</thumbnail>" )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment