What do you think about?
this is the code:
Code: Select all
url = nil
function descriptor()
return { title = "Download videos from the web" ;
version = "0.0.1" ;
author = "Marco Scarpetta" ;
url = 'http://vlc-videos-down.sourceforge.net';
shortdesc = "Download videos";
description = "<center><b>Download videos from the web</b></center><br />";
capabilities = { "input-listener" } }
end
function create_dialog()
dlg = vlc.dialog("vlc download videos")
dlg:add_label("Enter the URL of the video you want to download.", 1, 1, 4, 1)
dlg:add_label("<b>URL:</b>", 1, 2, 1, 1)
local item = vlc.input.item()
url = dlg:add_text_input(item and item:name() or "", 2, 2, 1, 1)
dlg:add_button("Download", download, 3, 2, 1, 1)
--This will help to choose which format to save the video, but I do not know how it works
--formato = dlg:add_dropdown()
end
function activate()
create_dialog()
end
function close()
vlc.deactivate()
end
--this is the most important function
function download()
--from the url it will download and save rhe video
end