]> git.sesse.net Git - vlc/commitdiff
LUA HTTP Interface: If <id> is omitted at the status.xml play command, play last...
authorGBX <g.b.x@web.de>
Sat, 2 Oct 2010 06:53:15 +0000 (08:53 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Sat, 2 Oct 2010 06:53:15 +0000 (08:53 +0200)
Signed-off-by: Rémi Duraffort <ivoire@videolan.org>
share/lua/http/requests/README.txt
share/lua/http/requests/status.xml

index a4cfacbeeaed3349770b7e0fe22ac454c7c26857..c287acf69050762f5304b805a7795546ca3516fe 100644 (file)
@@ -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>:
index 123861fea7b406e14f82c5b115d4eec3d81d4cd3..6581c80cdf6797341bb4a9549dfb3254786dfbeb 100644 (file)
@@ -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