From: Fabio Ritrovato Date: Mon, 22 Feb 2010 21:41:57 +0000 (+0100) Subject: Lua SD: let the user know we are working X-Git-Tag: 1.1.0-pre1~731 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=d38329b4dbcc1901e2f3ac147e1dd0697a174a7e;p=vlc Lua SD: let the user know we are working --- diff --git a/share/lua/sd/fmc.lua b/share/lua/sd/fmc.lua index 98ebf75f63..c1a9b3f37d 100644 --- a/share/lua/sd/fmc.lua +++ b/share/lua/sd/fmc.lua @@ -26,6 +26,7 @@ function descriptor() end function main() + local loading = vlc.sd.add_item( {path="vlc://nop",title="Loading..."} ) local tree = simplexml.parse_url("http://www.archive.org/download/freemusiccharts.songs/fmc.xml") for _, show_node in ipairs( tree.children ) do simplexml.add_name_maps( show_node ) @@ -52,4 +53,5 @@ function main() node:add_subitem( {title=show_node.children_map["date"][1].children[1] .. " MP3 Podcast",path=show_node.children_map["podcastmp3"][1].children[1]} ) node:add_subitem( {title=show_node.children_map["date"][1].children[1] .. " OGG Podcast",path=show_node.children_map["podcastogg"][1].children[1]} ) end + vlc.sd.remove_item( loading ) end diff --git a/share/lua/sd/freebox.lua b/share/lua/sd/freebox.lua index 50fb99bda0..c40aa10699 100644 --- a/share/lua/sd/freebox.lua +++ b/share/lua/sd/freebox.lua @@ -30,6 +30,7 @@ function main() if line ~= "#EXTM3U" then return nil end + local loading = vlc.sd.add_item( {path="vlc://nop",title="Loading..."} ) line = fd:readline() local duration, artist, name local options={"deinterlace=1"} @@ -48,4 +49,5 @@ function main() end line = fd:readline() end + vlc.sd.remove_item( loading ) end diff --git a/share/lua/sd/icecast.lua b/share/lua/sd/icecast.lua index 03c092b564..9131e4eb46 100644 --- a/share/lua/sd/icecast.lua +++ b/share/lua/sd/icecast.lua @@ -26,6 +26,7 @@ function descriptor() end function main() + local loading = vlc.sd.add_item( {path="vlc://nop",title="Loading..."} ) local tree = simplexml.parse_url("http://dir.xiph.org/yp.xml") for _, station in ipairs( tree.children ) do simplexml.add_name_maps( station ) @@ -36,4 +37,5 @@ function main() meta={["Icecast"]={["Bitrate"]=station.children_map["bitrate"][1].children[1]; ["Server type"]=station.children_map["server_type"][1].children[1]}}} ) end + vlc.sd.remove_item( loading ) end