password = config.password or "admin"
--[[ The main loop ]]
-while not vlc.misc.should_die() do
+while true do
local write, read = h:accept_and_select()
for _, client in pairs(write) do
local item
repeat
item = vlc.input.item()
-until (item and item:is_preparsed()) or vlc.misc.should_die()
+until (item and item:is_preparsed())
-- preparsing doesn't always provide all the information we want (like duration)
repeat
-until item:stats()["demux_read_bytes"] > 0 or vlc.misc.should_die()
+until item:stats()["demux_read_bytes"] > 0
vlc.msg.info("name: "..item:name())
vlc.msg.info("uri: "..vlc.strings.decode_uri(item:uri()))
--or h:listen( { "localhost:4212", "*console" } )
-- The main loop
- while not vlc.misc.should_die() do
+ while true do
-- accept new connections and select active clients
local write, read = h:accept_and_select()