[vlc-devel] [PATCH] LUA HTTP Interface: If <id> is omitted at the status.xml play command, play last active item instead of first playlist item.
GBX
g.b.x at web.de
Thu Sep 30 14:33:48 CEST 2010
LUA HTTP Interface: If <id> is omitted at the status.xml play command, play
last active item instead of first playlist item.
---
share/lua/http/requests/README.txt | 2 +-
share/lua/http/requests/status.xml | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
mode change 100644 => 100755 share/lua/http/requests/README.txt
mode change 100644 => 100755 share/lua/http/requests/status.xml
diff --git a/share/lua/http/requests/README.txt b/share/lua/http/requests/README.txt
old mode 100644
new mode 100755
index a4cfacb..c287acf
--- 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
old mode 100644
new mode 100755
index 123861f..6581c80
--- 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
--
1.7.0.4
More information about the vlc-devel
mailing list