diff --git a/mandy.lua b/mandy.lua index 19d0d5e..1bddb69 100644 --- a/mandy.lua +++ b/mandy.lua @@ -14,7 +14,7 @@ require('ffmpeg_progress') --Main url entry box function url_entry() -res, url = iup.GetParam("Mandy 0.2 - Enter URL", nil, +res, url = iup.GetParam("Mandy 0.4 - Enter URL", nil, "Enter Youtube URL: %s\n", "") if res == true then @@ -51,7 +51,7 @@ end function set_dir() getPath = iup.filedlg{dialogtype = "SAVE", title="Save file...", filter="*.mp3", filterinfo="mp3", - directory="Music/", + directory=".", file="*.mp3"} getPath:popup(iup.ANYWHERE, iup.ANYWHERE) @@ -103,12 +103,12 @@ function ytDl(x) end function ffmpeg(tmpPath, dirD) - - local mp3 = "ffmpeg -i "..tmpPath.." -acodec libmp3lame -ac 2 -ab 192k -vn -y "..dirD + local subSpaces = string.gsub(dirD, "", "\\") + local mp3 = "ffmpeg -i "..tmpPath.." -acodec libmp3lame -ac 2 -ab 192k -vn -y "..subSpaces --os.execute(mp3) convert_mp3.go(mp3) - io.popen("vlc "..dirD) - + io.popen("notify-send 'The file was saved to' "..subSpaces) + io.popen("xdg-open "..subSpaces) end --put everything into a table to use local functions globally global = {}