Merged in testing (pull request #3)
Everything seems to be fully working now
This commit is contained in:
commit
c573c46553
@ -31,7 +31,7 @@ dependancies.
|
||||
- libfreetype6-dev (ubuntu)
|
||||
- youtube-dl
|
||||
- ffmpeg
|
||||
- vlc (temporary)
|
||||
- libnotify - push notifications
|
||||
- git
|
||||
- [IUP][5]
|
||||
- [CD][6]
|
||||
@ -49,7 +49,7 @@ main repository:
|
||||
|
||||
|
||||
|
||||
pacman -S lua youtube-dl ffmpeg vlc git
|
||||
pacman -S lua youtube-dl ffmpeg git libnotify
|
||||
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ conversion to mp3:
|
||||
|
||||
|
||||
|
||||
sudo apt-get install lua5.2 youtube-dl ffmpeg vlc git libavcodec-extra-53
|
||||
sudo apt-get install lua5.2 youtube-dl ffmpeg vlc git libavcodec-extra-53 libfreetype6-dev libnotify
|
||||
|
||||
|
||||
###IUP
|
||||
|
16
mandy.lua
16
mandy.lua
@ -10,10 +10,11 @@ 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
|
||||
@ -50,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)
|
||||
@ -97,21 +98,18 @@ function ytDl(x)
|
||||
|
||||
popin.ytdl(tmpPath)
|
||||
|
||||
|
||||
return tmpPath2
|
||||
|
||||
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 = {}
|
||||
global.url = function ()
|
||||
|
@ -22,7 +22,7 @@ local function downloadStart(YtLink) --create button and cancle flag
|
||||
local pTest = "1"
|
||||
downloadProgress = iup.progressbar{expand="HORIZONTAL"}
|
||||
dlgProgress = iup.dialog{ --create main window
|
||||
title = YtLink,
|
||||
title = "Downloading.. ",
|
||||
dialogframe = "YES", border = "YES",
|
||||
iup.vbox { -- create vbox that contains said objects
|
||||
downloadProgress,
|
||||
|
Loading…
x
Reference in New Issue
Block a user