vlc | branch: master | GBX <[email protected]> | Sat Oct 2 08:53:15 2010 +0200| [5d1ad8bc46fb54274d481c17b365b7c0442febca] | committer: Rémi Duraffort
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: Rémi Duraffort <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5d1ad8bc46fb54274d481c17b365b7c0442febca --- 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 a4cfacb..c287acf 100644 --- a/share/lua/http/requests/README.txt +++ b/share/lua/http/requests/README.txt @@ -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>: diff --git a/share/lua/http/requests/status.xml b/share/lua/http/requests/status.xml index 123861f..6581c80 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 _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
