Commit 644b1d06 authored by Pierre-Hugues Husson's avatar Pierre-Hugues Husson Committed by Jean-Baptiste Kempf

Add name and duration to enqueue and play

Close #10242
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 983198b0
...@@ -75,6 +75,8 @@ processcommands = function () ...@@ -75,6 +75,8 @@ processcommands = function ()
local val = _GET['val'] local val = _GET['val']
local options = _GET['option'] local options = _GET['option']
local band = tonumber(_GET['band']) 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 if type(options) ~= "table" then -- Deal with the 0 or 1 option case
options = { options } options = { options }
end end
...@@ -87,11 +89,11 @@ processcommands = function () ...@@ -87,11 +89,11 @@ processcommands = function ()
end end
vlc.msg.err( "</options>" ) 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 elseif command == "addsubtitle" then
vlc.input.add_subtitle (vlc.strings.make_uri(val)) vlc.input.add_subtitle (vlc.strings.make_uri(val))
elseif command == "in_enqueue" then 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 elseif command == "pl_play" then
if id == -1 then if id == -1 then
vlc.playlist.play() vlc.playlist.play()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment