reverted back to original

This commit is contained in:
silvernode 2013-07-26 21:07:19 -05:00
parent 0585edabb8
commit c374891fa8
2 changed files with 17 additions and 23 deletions

View File

@ -8,8 +8,8 @@ function main()
if saveDir == "23" then
return 0
end
global.path(url, saveDir)
--local convert = global.ffmpeg(tmpPath, saveDir)
local tmpPath = global.path(url)
local convert = global.ffmpeg(tmpPath, saveDir)
end

View File

@ -89,26 +89,20 @@ function set_dir()
end
function ytDl(x, y)
--local tmpName = math.random(0,999999999999)
--local tmpNameTwo = math.random(0,999999999999)
function ytDl(x)
local tmpName = math.random(0,999999999999)
local tmpNameTwo = math.random(0,999999999999)
local tmpPath = " --extract-audio --audio-format=mp3 --output="..y.." "..x
--local tmpPath2 = "/tmp/youtube-dl-"..tmpName.."-"..tmpNameTwo..".flv"
local tmpPath = x.." --extract-audio --audio-format=mp3 --output="..tmpName.."-"..tmpNameTwo..".flv"
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
return tmpPath2
end
--[[function ffmpeg(tmpPath, dirD)
function ffmpeg(tmpPath, dirD)
local mp3 = "ffmpeg -i "..tmpPath.." -acodec libmp3lame -ac 2 -ab 192k -vn -y "..dirD
os.execute(mp3)
@ -116,7 +110,7 @@ end
io.popen("vlc "..dirD)
end
--]]
--put everything into a table to use local functions globally
global = {}
global.url = function ()
@ -129,14 +123,14 @@ global.dir = function()
return dir
end
global.path = function(url, dir)
local yt = ytDl(url, dir)
return
global.path = function(url)
local yt = ytDl(url)
return yt
end
--global.ffmpeg = function(tmpPath, saveDir)
-- local convert = ffmpeg(tmpPath, saveDir)
-- return convert
--end
global.ffmpeg = function(tmpPath, saveDir)
local convert = ffmpeg(tmpPath, saveDir)
return convert
end