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)
|
- libfreetype6-dev (ubuntu)
|
||||||
- youtube-dl
|
- youtube-dl
|
||||||
- ffmpeg
|
- ffmpeg
|
||||||
- vlc (temporary)
|
- libnotify - push notifications
|
||||||
- git
|
- git
|
||||||
- [IUP][5]
|
- [IUP][5]
|
||||||
- [CD][6]
|
- [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
|
###IUP
|
||||||
|
16
mandy.lua
16
mandy.lua
@ -10,10 +10,11 @@ require('ffmpeg_progress')
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--Main url entry box
|
--Main url entry box
|
||||||
function url_entry()
|
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", "")
|
"Enter Youtube URL: %s\n", "")
|
||||||
|
|
||||||
if res == true then
|
if res == true then
|
||||||
@ -50,7 +51,7 @@ end
|
|||||||
function set_dir()
|
function set_dir()
|
||||||
getPath = iup.filedlg{dialogtype = "SAVE", title="Save file...",
|
getPath = iup.filedlg{dialogtype = "SAVE", title="Save file...",
|
||||||
filter="*.mp3", filterinfo="mp3",
|
filter="*.mp3", filterinfo="mp3",
|
||||||
directory="Music/",
|
directory=".",
|
||||||
file="*.mp3"}
|
file="*.mp3"}
|
||||||
|
|
||||||
getPath:popup(iup.ANYWHERE, iup.ANYWHERE)
|
getPath:popup(iup.ANYWHERE, iup.ANYWHERE)
|
||||||
@ -97,21 +98,18 @@ function ytDl(x)
|
|||||||
|
|
||||||
popin.ytdl(tmpPath)
|
popin.ytdl(tmpPath)
|
||||||
|
|
||||||
|
|
||||||
return tmpPath2
|
return tmpPath2
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function ffmpeg(tmpPath, dirD)
|
function ffmpeg(tmpPath, dirD)
|
||||||
|
local subSpaces = string.gsub(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 "..subSpaces
|
||||||
--os.execute(mp3)
|
--os.execute(mp3)
|
||||||
convert_mp3.go(mp3)
|
convert_mp3.go(mp3)
|
||||||
|
io.popen("notify-send 'The file was saved to' "..subSpaces)
|
||||||
io.popen("vlc "..dirD)
|
io.popen("xdg-open "..subSpaces)
|
||||||
|
|
||||||
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 ()
|
||||||
|
@ -22,7 +22,7 @@ local function downloadStart(YtLink) --create button and cancle flag
|
|||||||
local pTest = "1"
|
local pTest = "1"
|
||||||
downloadProgress = iup.progressbar{expand="HORIZONTAL"}
|
downloadProgress = iup.progressbar{expand="HORIZONTAL"}
|
||||||
dlgProgress = iup.dialog{ --create main window
|
dlgProgress = iup.dialog{ --create main window
|
||||||
title = YtLink,
|
title = "Downloading.. ",
|
||||||
dialogframe = "YES", border = "YES",
|
dialogframe = "YES", border = "YES",
|
||||||
iup.vbox { -- create vbox that contains said objects
|
iup.vbox { -- create vbox that contains said objects
|
||||||
downloadProgress,
|
downloadProgress,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user