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:
parent
5d9b58edb2
commit
fd98640572
1 changed files with 5 additions and 0 deletions
|
@ -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"]:
|
||||||
|
|
Loading…
Reference in a new issue