Commit fd56030a authored by Pierre Ynard's avatar Pierre Ynard

luarc: simplify

parent 5e35aa8c
......@@ -608,8 +608,7 @@ end
function call_libvlc_command(cmd,client,arg)
local ok, vlcerr = pcall( vlc.var.libvlc_command, cmd, arg )
if not ok then
local a = arg or ""
if a ~= "" then a = " " .. a end
local a = arg and " "..arg or ""
client:append("Error in `"..cmd..a.."' ".. vlcerr) -- when pcall fails, the 2nd arg is the error message.
end
return vlcerr
......
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