Fix youtube-dl processing
This commit is contained in:
parent
b30f0d868b
commit
f7e9e806e0
@ -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 = ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user