From 84b86b481da0edeebe7b1b4420a253750799188f Mon Sep 17 00:00:00 2001 From: Logen Kain Date: Sat, 27 Jul 2013 12:29:05 -0500 Subject: [PATCH] added DEPENDS, fixed .mp3 validation and space substitution --- DEPENDS | 11 +++++++++++ mandy.lua | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 DEPENDS diff --git a/DEPENDS b/DEPENDS new file mode 100644 index 0000000..75ffe2d --- /dev/null +++ b/DEPENDS @@ -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 diff --git a/mandy.lua b/mandy.lua index 2367ed9..c67cf6d 100644 --- a/mandy.lua +++ b/mandy.lua @@ -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)