Fix youtube-dl processing

This commit is contained in:
Lartza 2018-06-19 14:02:41 +03:00
parent b30f0d868b
commit f7e9e806e0

View File

@ -320,7 +320,7 @@ class MumbleBot:
def download_music(self, url): def download_music(self, url):
url_hash = hashlib.md5(url.encode()).hexdigest() url_hash = hashlib.md5(url.encode()).hexdigest()
path = var.config.get('bot', 'tmp_folder') + url_hash + ".mp3" path = var.config.get('bot', 'tmp_folder') + url_hash + ".%(ext)s"
ydl_opts = { ydl_opts = {
'format': 'bestaudio/best', 'format': 'bestaudio/best',
'outtmpl': path, 'outtmpl': path,
@ -343,7 +343,7 @@ class MumbleBot:
pass pass
else: else:
break break
return path, video_title return path.replace(".%(ext)s", ".mp3"), video_title
def loop(self): def loop(self):
raw_music = "" raw_music = ""