From 5d1ad8bc46fb54274d481c17b365b7c0442febca Mon Sep 17 00:00:00 2001 From: GBX Date: Sat, 2 Oct 2010 08:53:15 +0200 Subject: [PATCH] LUA HTTP Interface: If is omitted at the status.xml play command, play last active item instead of first playlist item. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Duraffort --- share/lua/http/requests/README.txt | 2 +- share/lua/http/requests/status.xml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/share/lua/http/requests/README.txt b/share/lua/http/requests/README.txt index a4cfacbeea..c287acf690 100644 --- a/share/lua/http/requests/README.txt +++ b/share/lua/http/requests/README.txt @@ -23,7 +23,7 @@ status.xml: > add to playlist: ?command=in_enqueue&input= -> play playlist item : +> play playlist item . If is omitted, play last active item: ?command=pl_play&id= > toggle pause. If current state was 'stop', play item : diff --git a/share/lua/http/requests/status.xml b/share/lua/http/requests/status.xml index 123861fea7..6581c80cdf 100644 --- a/share/lua/http/requests/status.xml +++ b/share/lua/http/requests/status.xml @@ -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 - vlc.playlist.goto(id) + 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 -- 2.39.2