Commit 5d1ad8bc authored by GBX's avatar GBX Committed by Rémi Duraffort

LUA HTTP Interface: If <id> is omitted at the status.xml play command, play...

LUA HTTP Interface: If <id> is omitted at the status.xml play command, play last active item instead of first playlist item.
Signed-off-by: default avatarRémi Duraffort <ivoire@videolan.org>
parent 599fbde7
......@@ -23,7 +23,7 @@ status.xml:
> add <mrl> to playlist:
?command=in_enqueue&input=<mrl>
> play playlist item <id>:
> play playlist item <id>. If <id> is omitted, play last active item:
?command=pl_play&id=<id>
> toggle pause. If current state was 'stop', play item <id>:
......
......@@ -55,7 +55,11 @@ if command == "in_play" then
elseif command == "in_enqueue" then
vlc.playlist.enqueue({{path=stripslashes(input),options=options}})
elseif command == "pl_play" then
if id == -1 then
vlc.playlist.play()
else
vlc.playlist.goto(id)
end
elseif command == "pl_pause" then
vlc.playlist.pause()
elseif command == "pl_stop" then
......
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