From: GBX Date: Sat, 2 Oct 2010 06:53:15 +0000 (+0200) Subject: LUA HTTP Interface: If is omitted at the status.xml play command, play last... X-Git-Tag: 1.2.0-pre1~5196 X-Git-Url: https://git.sesse.net/?p=vlc;a=commitdiff_plain;h=5d1ad8bc46fb54274d481c17b365b7c0442febca;hp=599fbde71fba4397aa62fe81f957ee641654997c LUA HTTP Interface: If is omitted at the status.xml play command, play last active item instead of first playlist item. Signed-off-by: RĂ©mi Duraffort --- 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