Make syncplay.lua use VLC 2.1.X running/closing code
This commit is contained in:
parent
e67f2cf98b
commit
43d5e9aded
@ -96,6 +96,8 @@ local oldinputstate
|
|||||||
local newfilepath
|
local newfilepath
|
||||||
local newinputstate
|
local newinputstate
|
||||||
|
|
||||||
|
running = true
|
||||||
|
|
||||||
-- Start hosting Syncplay interface.
|
-- Start hosting Syncplay interface.
|
||||||
|
|
||||||
port = tonumber(config["port"])
|
port = tonumber(config["port"])
|
||||||
@ -347,7 +349,7 @@ function do_command ( command, argument)
|
|||||||
elseif command == "set-rate" then errormsg = set_var("rate", tonumber(argument))
|
elseif command == "set-rate" then errormsg = set_var("rate", tonumber(argument))
|
||||||
elseif command == "display-osd" then errormsg = display_osd(argument)
|
elseif command == "display-osd" then errormsg = display_osd(argument)
|
||||||
elseif command == "load-file" then response = load_file(argument)
|
elseif command == "load-file" then response = load_file(argument)
|
||||||
elseif command == "close-vlc" then vlc.misc.quit()
|
elseif command == "close-vlc" then close_vlc()
|
||||||
else errormsg = unknowncommand
|
else errormsg = unknowncommand
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -359,6 +361,10 @@ function do_command ( command, argument)
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function close_vlc()
|
||||||
|
vlc.misc.quit()
|
||||||
|
running = false
|
||||||
|
end
|
||||||
|
|
||||||
function errormerge(argument, errormsg)
|
function errormerge(argument, errormsg)
|
||||||
-- Used to integrate 'no-input' error messages into command responses.
|
-- Used to integrate 'no-input' error messages into command responses.
|
||||||
@ -387,7 +393,7 @@ function set_playstate(argument)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- main loop, which alternates between writing and reading
|
-- main loop, which alternates between writing and reading
|
||||||
while not vlc.misc.should_die() do
|
while running do
|
||||||
-- accept new connections and select active clients
|
-- accept new connections and select active clients
|
||||||
local write, read = h:accept_and_select()
|
local write, read = h:accept_and_select()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user