]> git.sesse.net Git - vlc/blobdiff - share/lua/http/requests/status.xml
LUA HTTP Interface: If <id> is omitted at the status.xml play command, play last...
[vlc] / share / lua / http / requests / status.xml
index 17c76df1d281483208d60300cc300ec19ba116da..6581c80cdf6797341bb4a9549dfb3254786dfbeb 100644 (file)
@@ -44,7 +44,7 @@ end
 local status = vlc.playlist.status()
 
 if command == "in_play" then
-  ---[[
+  --[[
   vlc.msg.err( "<options>" )
   for a,b in ipairs(options) do
     vlc.msg.err(b)
@@ -55,10 +55,13 @@ 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.msg.err("FIXME: pl_pause implementation is ugly")
-  common.hotkey("key-play-pause") -- gruik
+  vlc.playlist.pause()
 elseif command == "pl_stop" then
   vlc.playlist.stop()
 elseif command == "pl_next" then
@@ -79,18 +82,13 @@ elseif command == "pl_loop" then
 elseif command == "pl_repeat" then
   vlc.playlist.repeat_()
 elseif command == "pl_sd" then
-  if(_GET['islua'] == "1") then
-    sdname = "lua{sd='" .. val .. "'}"
-  else
-    sdname = val
-  end
-  if vlc.sd.is_loaded(sdname) then
-    vlc.sd.remove(sdname)
+  if vlc.sd.is_loaded(val) then
+    vlc.sd.remove(val)
   else
-    vlc.sd.add(sdname)
+    vlc.sd.add(val)
   end
 elseif command == "fullscreen" then
-  vlc.fullscreen()
+  vlc.video.fullscreen()
 elseif command == "snapshot" then
   common.snapshot()
 elseif command == "volume" then