1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Fixato un bug in cui il musicbot non scaricava video

This commit is contained in:
Steffo 2018-07-31 18:21:36 +02:00
parent 5d9b58edb2
commit fd98640572

View file

@ -318,6 +318,11 @@ async def add_video_from_url(url, index: typing.Optional[int]=None, enqueuer: di
"simulate": True}) as ytdl: "simulate": True}) as ytdl:
info = await loop.run_in_executor(executor, info = await loop.run_in_executor(executor,
functools.partial(ytdl.extract_info, url=url, download=False)) functools.partial(ytdl.extract_info, url=url, download=False))
if info is None:
await client.send_message(client.get_channel(config["Discord"]["main_channel"]),
f"⚠ Non è stato trovato nessun video all'URL `{url}`,"
f" pertanto non è stato aggiunto alla coda.")
return
if "entries" in info: if "entries" in info:
# This is a playlist # This is a playlist
for entry in info["entries"]: for entry in info["entries"]: