MP3-YT Download gefixt

This commit is contained in:
Akamaru 2015-12-19 15:17:45 +01:00
parent 5569f7d94c
commit 31c792468d

View File

@ -21,7 +21,7 @@ function run(msg, matches)
if string.match(msg.text, "/mp3") then
text = run_bash('youtube-dl -o "tmp/%(title)s.%(ext)s" --extract-audio --audio-format mp3 '..URL)
audio = string.match(text, 'Correcting container in "tmp/(.*).m4a"')
audio = string.match(text, '%[avconv%] Destination: tmp/(.*).mp3')
file = 'tmp/'..audio..'.mp3'
send_audio(get_receiver(msg), file, ok_cb, false)
end