]> git.sesse.net Git - vlc/commitdiff
Lua SD: let the user know we are working
authorFabio Ritrovato <sephiroth87@videolan.org>
Mon, 22 Feb 2010 21:41:57 +0000 (22:41 +0100)
committerFabio Ritrovato <sephiroth87@videolan.org>
Mon, 22 Feb 2010 21:41:57 +0000 (22:41 +0100)
share/lua/sd/fmc.lua
share/lua/sd/freebox.lua
share/lua/sd/icecast.lua

index 98ebf75f63e03fcaaadbf0759c723aa824721912..c1a9b3f37dec82cc79675fd32deae4b873572003 100644 (file)
@@ -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
index 50fb99bda054be1db99455306785cab7bfb596fd..c40aa10699d55ea8940dc3ee6e12a08ae64bdf6d 100644 (file)
@@ -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
index 03c092b5645cc2eb7197098e7f5661f8564118b6..9131e4eb461dd0a312cf015e5df483f4fb5860cc 100644 (file)
@@ -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