Commit b22bd1b3 authored by Antoine Cellerier's avatar Antoine Cellerier

Implement option usage/parsing in rc.lua.

parent 74d68fbd
......@@ -155,14 +155,18 @@ function quit(name,client)
end
function add(name,client,arg)
-- TODO: parse (and use) options
local f
if name == "enqueue" then
f = vlc.playlist.enqueue
else
f = vlc.playlist.add
end
f({{path=arg}})
local options = {}
for o in string.gmatch(arg," +:([^ ]*)") do
table.insert(options,o)
end
arg = string.gsub(arg," +:.*$","")
f({{path=arg,options=options}})
end
function playlist_is_tree( client )
......
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