Merge branch 'silvernode' of https://bitbucket.org/silvernode1/mandy into silvernode

This commit is contained in:
silvernode 2013-07-26 20:36:54 -05:00
commit 0585edabb8
2 changed files with 22 additions and 4 deletions

View File

@ -6,7 +6,15 @@
require("iuplua")
require("iupluacontrols")
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
@ -84,11 +92,17 @@ end
function ytDl(x, y)
--local tmpName = 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"
popin.ytdl(tmpPath)
repeat
io.write("w/e\n")
until file_check(/usr/var/ffmpeg)
io.popen("vlc "..y)
return
@ -117,7 +131,7 @@ end
global.path = function(url, dir)
local yt = ytDl(url, dir)
return yt
return
end
--global.ffmpeg = function(tmpPath, saveDir)

View File

@ -5,6 +5,7 @@
-- keep that in mind as well
require ('iuplua')
local cancelflag --set variable
local downloadProgress --set variable
@ -90,6 +91,9 @@ round up and only update if number has changed
end
until not c-- creating a loop until c is not true
pipe:close() -- closing the ipopen
iup.Close()
end