Merge branch 'silvernode' of https://bitbucket.org/silvernode1/mandy into silvernode
This commit is contained in:
commit
0585edabb8
22
mandy.lua
22
mandy.lua
@ -6,7 +6,15 @@
|
|||||||
require("iuplua")
|
require("iuplua")
|
||||||
require("iupluacontrols")
|
require("iupluacontrols")
|
||||||
require('progress')
|
require('progress')
|
||||||
require('ffmpeg_progress')
|
|
||||||
|
local function file_check(name)
|
||||||
|
local f=io.open(name, "r")
|
||||||
|
if f~=nil then io.close(f)
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--Main url entry box
|
--Main url entry box
|
||||||
@ -84,11 +92,17 @@ end
|
|||||||
function ytDl(x, y)
|
function ytDl(x, y)
|
||||||
--local tmpName = math.random(0,999999999999)
|
--local tmpName = math.random(0,999999999999)
|
||||||
--local tmpNameTwo = math.random(0,999999999999)
|
--local tmpNameTwo = math.random(0,999999999999)
|
||||||
local thePath = set_dir()
|
|
||||||
local tmpPath = x.."--extract-audio --audio-format=mp3 -t --output="..thePath
|
local tmpPath = " --extract-audio --audio-format=mp3 --output="..y.." "..x
|
||||||
--local tmpPath2 = "/tmp/youtube-dl-"..tmpName.."-"..tmpNameTwo..".flv"
|
--local tmpPath2 = "/tmp/youtube-dl-"..tmpName.."-"..tmpNameTwo..".flv"
|
||||||
|
|
||||||
popin.ytdl(tmpPath)
|
popin.ytdl(tmpPath)
|
||||||
|
|
||||||
|
repeat
|
||||||
|
io.write("w/e\n")
|
||||||
|
until file_check(/usr/var/ffmpeg)
|
||||||
|
|
||||||
|
|
||||||
io.popen("vlc "..y)
|
io.popen("vlc "..y)
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -117,7 +131,7 @@ end
|
|||||||
|
|
||||||
global.path = function(url, dir)
|
global.path = function(url, dir)
|
||||||
local yt = ytDl(url, dir)
|
local yt = ytDl(url, dir)
|
||||||
return yt
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
--global.ffmpeg = function(tmpPath, saveDir)
|
--global.ffmpeg = function(tmpPath, saveDir)
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
-- keep that in mind as well
|
-- keep that in mind as well
|
||||||
require ('iuplua')
|
require ('iuplua')
|
||||||
|
|
||||||
|
|
||||||
local cancelflag --set variable
|
local cancelflag --set variable
|
||||||
local downloadProgress --set variable
|
local downloadProgress --set variable
|
||||||
|
|
||||||
@ -90,6 +91,9 @@ round up and only update if number has changed
|
|||||||
end
|
end
|
||||||
|
|
||||||
until not c-- creating a loop until c is not true
|
until not c-- creating a loop until c is not true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pipe:close() -- closing the ipopen
|
pipe:close() -- closing the ipopen
|
||||||
iup.Close()
|
iup.Close()
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user