[vlc-commits] Add name and duration to enqueue and play

Pierre-Hugues Husson git at videolan.org
Fri Dec 27 19:31:08 CET 2013


vlc | branch: master | Pierre-Hugues Husson <phh at phh.me> | Fri Dec 27 19:15:36 2013 +0100| [644b1d06da5b0aee153b0438d9121be77d29bbaf] | committer: Jean-Baptiste Kempf

Add name and duration to enqueue and play

Close #10242

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=644b1d06da5b0aee153b0438d9121be77d29bbaf
---

 share/lua/intf/modules/httprequests.lua |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/share/lua/intf/modules/httprequests.lua b/share/lua/intf/modules/httprequests.lua
index 444f89d..fe93ef4 100644
--- a/share/lua/intf/modules/httprequests.lua
+++ b/share/lua/intf/modules/httprequests.lua
@@ -75,6 +75,8 @@ processcommands = function ()
     local val = _GET['val']
     local options = _GET['option']
     local band = tonumber(_GET['band'])
+    local name = _GET['name']
+    local duration = tonumber(_GET['duration'])
     if type(options) ~= "table" then -- Deal with the 0 or 1 option case
         options = { options }
     end
@@ -87,11 +89,11 @@ processcommands = function ()
         end
         vlc.msg.err( "</options>" )
         --]]
-        vlc.playlist.add({{path=vlc.strings.make_uri(input),options=options}})
+        vlc.playlist.add({{path=vlc.strings.make_uri(input),options=options,name=name,duration=duration}})
     elseif command == "addsubtitle" then
         vlc.input.add_subtitle (vlc.strings.make_uri(val))
     elseif command == "in_enqueue" then
-        vlc.playlist.enqueue({{path=vlc.strings.make_uri(input),options=options}})
+        vlc.playlist.enqueue({{path=vlc.strings.make_uri(input),options=options,name=name,duration=duration}})
     elseif command == "pl_play" then
         if id == -1 then
             vlc.playlist.play()



More information about the vlc-commits mailing list