Commit 84f6eb34 authored by Fabio Ritrovato's avatar Fabio Ritrovato

Lua SD: implement the descriptor() function in scripts

parent 87151c41
--SD_Description=Free Music Charts
--[[ --[[
$Id$ $Id$
...@@ -22,6 +21,10 @@ ...@@ -22,6 +21,10 @@
--]] --]]
require "simplexml" require "simplexml"
function descriptor()
return { title="Free Music Charts" }
end
function main() function main()
local tree = simplexml.parse_url("http://www.archive.org/download/freemusiccharts.songs/fmc.xml") local tree = simplexml.parse_url("http://www.archive.org/download/freemusiccharts.songs/fmc.xml")
for _, show_node in ipairs( tree.children ) do for _, show_node in ipairs( tree.children ) do
......
--SD_Description=Freebox TV
--[[ --[[
$Id$ $Id$
...@@ -21,6 +20,10 @@ ...@@ -21,6 +20,10 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
--]] --]]
function descriptor()
return { title="Freebox TV" }
end
function main() function main()
local fd = vlc.stream( "http://mafreebox.freebox.fr/freeboxtv/playlist.m3u" ) local fd = vlc.stream( "http://mafreebox.freebox.fr/freeboxtv/playlist.m3u" )
local line= fd:readline() local line= fd:readline()
......
--SD_Description=French TV
--[[ --[[
$Id$ $Id$
...@@ -21,6 +20,10 @@ ...@@ -21,6 +20,10 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
--]] --]]
function descriptor()
return { title="French TV" }
end
function main() function main()
node = vlc.sd.add_node( {title="Canal +"} ) node = vlc.sd.add_node( {title="Canal +"} )
node:add_subitem( {title="Le SAV des émissions ",url="http://www.canalplus.fr/index.php?pid=1782",options={"http-forward-cookies"}} ) node:add_subitem( {title="Le SAV des émissions ",url="http://www.canalplus.fr/index.php?pid=1782",options={"http-forward-cookies"}} )
......
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