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) ...@@ -155,14 +155,18 @@ function quit(name,client)
end end
function add(name,client,arg) function add(name,client,arg)
-- TODO: parse (and use) options
local f local f
if name == "enqueue" then if name == "enqueue" then
f = vlc.playlist.enqueue f = vlc.playlist.enqueue
else else
f = vlc.playlist.add f = vlc.playlist.add
end 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 end
function playlist_is_tree( client ) 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