Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
8a16cc00
Commit
8a16cc00
authored
Jun 13, 2008
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update lua playlist scripts to new API. (untested)
parent
32601584
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
22 deletions
+22
-22
share/lua/playlist/appletrailers.lua
share/lua/playlist/appletrailers.lua
+4
-4
share/lua/playlist/canalplus.lua
share/lua/playlist/canalplus.lua
+8
-8
share/lua/playlist/dailymotion.lua
share/lua/playlist/dailymotion.lua
+5
-5
share/lua/playlist/france2.lua
share/lua/playlist/france2.lua
+1
-1
share/lua/playlist/googlevideo.lua
share/lua/playlist/googlevideo.lua
+1
-1
share/lua/playlist/megavideo.lua
share/lua/playlist/megavideo.lua
+1
-1
share/lua/playlist/youtube.lua
share/lua/playlist/youtube.lua
+1
-1
share/lua/playlist/youtube_homepage.lua
share/lua/playlist/youtube_homepage.lua
+1
-1
No files found.
share/lua/playlist/appletrailers.lua
View file @
8a16cc00
...
...
@@ -37,9 +37,9 @@ function parse()
or
string.match
(
line
,
"http://images.apple.com/movies/.*%.mov"
)
then
if
string.match
(
line
,
"http://movies.apple.com/movies/.*%.mov"
)
then
path
=
vlc
.
decode_uri
(
string.gsub
(
line
,
"^.*(http://movies.apple.com/movies/.*%.mov).*$"
,
"%1"
)
)
path
=
vlc
.
strings
.
decode_uri
(
string.gsub
(
line
,
"^.*(http://movies.apple.com/movies/.*%.mov).*$"
,
"%1"
)
)
elseif
string.match
(
line
,
"http://images.apple.com/movies/.*%.mov"
)
then
path
=
vlc
.
decode_uri
(
string.gsub
(
line
,
"^.*(http://images.apple.com/movies/.*%.mov).*$"
,
"%1"
)
)
path
=
vlc
.
strings
.
decode_uri
(
string.gsub
(
line
,
"^.*(http://images.apple.com/movies/.*%.mov).*$"
,
"%1"
)
)
end
if
string.match
(
path
,
"480p"
)
then
extraname
=
" (480p)"
...
...
@@ -54,11 +54,11 @@ function parse()
end
if
string.match
(
line
,
"<title>"
)
then
title
=
vlc
.
decode_uri
(
string.gsub
(
line
,
"^.*<title>([^<]*).*$"
,
"%1"
)
)
title
=
vlc
.
strings
.
decode_uri
(
string.gsub
(
line
,
"^.*<title>([^<]*).*$"
,
"%1"
)
)
end
if
string.match
(
line
,
"<meta name=\"
Description
\
""
)
then
description
=
vlc
.
resolve_xml_special_chars
(
string.gsub
(
line
,
"^.*name=\"
Description
\
" content=\"
([
^
\
"]*)\"
.
*
$
", "
%
1
" ) )
description
=
vlc
.
strings
.
resolve_xml_special_chars
(
string.gsub
(
line
,
"^.*name=\"
Description
\
" content=\"
([
^
\
"]*)\"
.
*
$
", "
%
1
" ) )
end
end
return p
...
...
share/lua/playlist/canalplus.lua
View file @
8a16cc00
...
...
@@ -26,7 +26,7 @@ end
-- Parse function.
function
parse
()
p
=
{}
--vlc.msg
_
dbg( vlc.path )
--vlc.msg
.
dbg( vlc.path )
if
string.match
(
vlc
.
path
,
"www.canalplus.fr/index.php%?pid="
)
then
-- This is the HTML page's URL
local
id
,
name
,
description
,
arturl
...
...
@@ -34,7 +34,7 @@ function parse()
-- Try to find the video's title
local
line
=
vlc
.
readline
()
if
not
line
then
break
end
-- vlc.msg
_
dbg( line )
-- vlc.msg
.
dbg( line )
if
string.match
(
line
,
"aVideos"
)
then
if
string.match
(
line
,
"CONTENT_ID.*="
)
then
id
=
string.gsub
(
line
,
"^.*\"
(.
-
)
\
".*$"
,
"%1"
)
...
...
@@ -61,10 +61,10 @@ function parse()
while
true
do
local
line
=
vlc
.
readline
()
if
not
line
then
break
end
--vlc.msg
_
dbg( line )
--vlc.msg
.
dbg( line )
if
string.match
(
line
,
"<hi>"
)
then
local
path
=
string.gsub
(
line
,
"^.*%[(.-)%].*$"
,
"%1"
)
vlc
.
msg
_
err
(
"Path is: "
..
tostring
(
path
)
)
vlc
.
msg
.
err
(
"Path is: "
..
tostring
(
path
)
)
return
{
{
path
=
path
}
}
end
end
...
...
@@ -76,10 +76,10 @@ function get_url_param( url, name )
end
function
add_item
(
p
,
id
,
name
,
description
,
arturl
)
--[[vlc.msg
_
dbg( "id: " .. tostring(id) )
vlc.msg
_
dbg( "name: " .. tostring(name) )
vlc.msg
_
dbg( "arturl: " .. tostring(arturl) )
vlc.msg
_
dbg( "description: " .. tostring(description) )
--[[vlc.msg
.
dbg( "id: " .. tostring(id) )
vlc.msg
.
dbg( "name: " .. tostring(name) )
vlc.msg
.
dbg( "arturl: " .. tostring(arturl) )
vlc.msg
.
dbg( "description: " .. tostring(description) )
--]]
--local path = "http://www.canalplus.fr/flash/xml/configuration/configuration-embed-video-player.php?xmlParam="..id.."-"..get_url_param(vlc.path,"pid")
local
path
=
"http://www.canalplus.fr/flash/xml/module/embed-video-player/embed-video-player.php?video_id="
..
id
..
"&pid="
..
get_url_param
(
vlc
.
path
,
"pid"
)
...
...
share/lua/playlist/dailymotion.lua
View file @
8a16cc00
...
...
@@ -36,8 +36,8 @@ function parse()
if
not
line
then
break
end
if
string.match
(
line
,
"param name=\"
flashvars
\
" value=\"
.
*
video
=
" )
then
arturl = vlc.decode_uri( string.gsub( line, "
^
.
*
param
name
=
\
"flashvars\"
value
=
\
".*preview=([^&]*).*$"
,
"%1"
)
)
videos
=
vlc
.
decode_uri
(
string.gsub
(
line
,
"^.*param name=\"
flashvars
\
" value=\"
.
*
video
=
([
^
&
]
*
).
*
$
", "
%
1
" ) )
arturl = vlc.
strings.
decode_uri( string.gsub( line, "
^
.
*
param
name
=
\
"flashvars\"
value
=
\
".*preview=([^&]*).*$"
,
"%1"
)
)
videos
=
vlc
.
strings
.
decode_uri
(
string.gsub
(
line
,
"^.*param name=\"
flashvars
\
" value=\"
.
*
video
=
([
^
&
]
*
).
*
$
", "
%
1
" ) )
--[[ we get a list of different streams available, at various codecs
and resolutions:
/A@@spark||/B@@spark-mini||/C@@vp6-hd||/D@@vp6||/E@@h264
...
...
@@ -62,7 +62,7 @@ function parse()
local bestcodec
for codec,_ in pairs(available) do
if pref[codec] == nil then
vlc.msg
_
warn( "
Unknown
codec
:
" .. codec )
vlc.msg
.
warn( "
Unknown
codec
:
" .. codec )
pref[codec] = 42 -- try the 1st unknown codec if other fail
end
if pref[codec] < score then
...
...
@@ -76,8 +76,8 @@ function parse()
end
if string.match( line, "
<
meta
name
=
\
"description\"" )
then
name = vlc.resolve_xml_special_chars( string.gsub( line, "
^
.
*
name
=
\
"description\"
content
=
\
"%w+ (.*) %w+ %w+ %w+ %w+ Videos\..*$"
,
"%1"
)
)
description
=
vlc
.
resolve_xml_special_chars
(
string.gsub
(
line
,
"^.*name=\"
description
\
" content=\"
%
w
+
.
*
%
w
+
%
w
+
%
w
+
%
w
+
Videos
\
.
([
^
\
"]*)\"
.
*
$
", "
%
1
" ) )
name = vlc.
strings.
resolve_xml_special_chars( string.gsub( line, "
^
.
*
name
=
\
"description\"
content
=
\
"%w+ (.*) %w+ %w+ %w+ %w+ Videos\..*$"
,
"%1"
)
)
description
=
vlc
.
strings
.
resolve_xml_special_chars
(
string.gsub
(
line
,
"^.*name=\"
description
\
" content=\"
%
w
+
.
*
%
w
+
%
w
+
%
w
+
%
w
+
Videos
\
.
([
^
\
"]*)\"
.
*
$
", "
%
1
" ) )
end
if path and name and description and arturl then break end
end
...
...
share/lua/playlist/france2.lua
View file @
8a16cc00
...
...
@@ -46,7 +46,7 @@ function parse()
if oldtime then
table.insert( p, { path = video; name = name; duration = time - oldtime; options = { ':start-time='..tostring(oldtime); ':stop-time='..tostring(time) } } )
end
name = vlc.resolve_xml_special_chars( string.gsub( line, "
^
.
*>
(.
*
)
<..*
$
", "
%
1
" ) )
name = vlc.
strings.
resolve_xml_special_chars( string.gsub( line, "
^
.
*>
(.
*
)
<..*
$
", "
%
1
" ) )
end
end
if oldtime then
...
...
share/lua/playlist/googlevideo.lua
View file @
8a16cc00
...
...
@@ -37,7 +37,7 @@ function parse()
if
string.match
(
line
,
"src=\"
/
googleplayer
.
swf
" ) then
url = string.gsub( line, "
.
*
videoUrl
=
([
^
&
]
*
).
*
" ,"
%
1
" )
arturl = string.gsub( line, "
.
*
thumbnailUrl
=
([
^
\
"]*).*"
,
"%1"
)
return
{
{
path
=
vlc
.
decode_uri
(
url
),
title
=
title
,
arturl
=
vlc
.
decode_uri
(
arturl
)
}
}
return
{
{
path
=
vlc
.
strings
.
decode_uri
(
url
),
title
=
title
,
arturl
=
vlc
.
strings
.
decode_uri
(
arturl
)
}
}
end
end
end
share/lua/playlist/megavideo.lua
View file @
8a16cc00
...
...
@@ -60,7 +60,7 @@ function parse()
if c < 16 and c > 3 then key = 61 + mod
elseif c < 96 and c > 67 then key = 189 + mod
elseif c < 20 and c > 6 then key = 65
else vlc.msg
_
err("
Oops
,
please
report
URL
to
developers
")
else vlc.msg
.
err("
Oops
,
please
report
URL
to
developers
")
end
i = i + 1
path = path .. string.char(key - c)
...
...
share/lua/playlist/youtube.lua
View file @
8a16cc00
...
...
@@ -25,7 +25,7 @@ end
function
get_arturl
(
path
,
video_id
)
if
string.match
(
vlc
.
path
,
"iurl="
)
then
return
vlc
.
decode_uri
(
get_url_param
(
vlc
.
path
,
"iurl"
)
)
return
vlc
.
strings
.
decode_uri
(
get_url_param
(
vlc
.
path
,
"iurl"
)
)
end
if
not
arturl
then
return
"http://img.youtube.com/vi/"
..
video_id
..
"/default.jpg"
...
...
share/lua/playlist/youtube_homepage.lua
View file @
8a16cc00
...
...
@@ -34,7 +34,7 @@ function parse()
for
_path
,
_artist
,
_name
in
string.gmatch
(
line
,
"href=\"
(
/
watch
%
?
v
=
[
^
\
"]*)\"
onclick
=
\
"_hbLink%('([^']*)','Vid[^\']*'%);\"
>
([
^<
]
*
)
</
a
><
br
/>
" )
do
path = "
http
:
//
www
.
youtube
.
com
" .. _path
name = vlc.resolve_xml_special_chars( _name )
name = vlc.
strings.
resolve_xml_special_chars( _name )
artist = _artist
end
for _min, _sec in string.gmatch( line, "
<
span
class
=
\
"runtime\"
>
(
%
d
*
):(
%
d
*
)
</
span
>
" )
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment