]> git.sesse.net Git - vlc/commitdiff
Add name and duration to enqueue and play
authorPierre-Hugues Husson <phh@phh.me>
Fri, 27 Dec 2013 18:15:36 +0000 (19:15 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 27 Dec 2013 18:30:19 +0000 (19:30 +0100)
Close #10242

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
share/lua/intf/modules/httprequests.lua

index 444f89d6272434e8af40050ef8f0be39e139405e..fe93ef4cfaa7964fc0e42a0e742a86e1fd7d93b0 100644 (file)
@@ -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()