added DEPENDS, fixed .mp3 validation and space substitution

This commit is contained in:
Logen Kain 2013-07-27 12:29:05 -05:00 committed by silvernode
parent cdfcbcc21f
commit 84b86b481d
2 changed files with 14 additions and 3 deletions

11
DEPENDS Normal file
View File

@ -0,0 +1,11 @@
lua 5.2
libfreetype6-dev (ubuntu)
youtube-dl
ffmpeg
libnotify
git
IUP
CD
IM
see readme for instructions for Ubuntu and Archlinux

View File

@ -39,7 +39,7 @@ function set_dir()
local status = getPath.status
if status == "1" then
if string.match(getPath.value, ".mp3") then
if string.match(getPath.value, "%.mp3") then
local savedPath = getPath.value
return savedPath
@ -73,8 +73,8 @@ function ytDl(x)
end
function ffmpeg(tmpPath, dirD)
local subSpaces = string.gsub(dirD, "", "\\")
local mp3 = "ffmpeg -i "..tmpPath.." -acodec libmp3lame -ac 2 -ab 192k -vn -y "..subSpaces
local subSpaces = string.gsub(dirD, " ", "\\")
local mp3 = "ffmpeg -i "..tmpPath.." -acodec libmp3lame -ac 2 -ab 192k -vn -y "..subSpaces
convert_mp3.go(mp3)
io.popen("notify-send 'The file was saved to' "..subSpaces)
io.popen("xdg-open "..subSpaces)