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 if saveDir == "23" then
return 0 return 0
end end
global.path(url, saveDir) local tmpPath = global.path(url)
--local convert = global.ffmpeg(tmpPath, saveDir) local convert = global.ffmpeg(tmpPath, saveDir)
end end

View File

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