Fix of metadata loading

This commit is contained in:
2023-06-22 18:44:17 +02:00
committed by migatu
parent f686552337
commit 8e64482623
+4
View File
@@ -1310,6 +1310,7 @@ async def zrob_mi_plejliste(ctx):
MUZYKA["queue"].insert(0, plik[1]) MUZYKA["queue"].insert(0, plik[1])
MUZYKA["requestor"].insert(0, ctx.author) MUZYKA["requestor"].insert(0, ctx.author)
metadata = eyed3.load(plik[1]) metadata = eyed3.load(plik[1])
if metadata and metadata.tag:
if metadata.tag.title: if metadata.tag.title:
reply += f"{index} {metadata.tag.title}" reply += f"{index} {metadata.tag.title}"
else: else:
@@ -1323,6 +1324,9 @@ async def zrob_mi_plejliste(ctx):
reply += ( reply += (
" z prywatnej kolekcji Hammera i na Twoją specjalną rpośbę.\n" " z prywatnej kolekcji Hammera i na Twoją specjalną rpośbę.\n"
) )
else:
reply += "{index}. {plik[1]} z prywatnej kolekcji Hammera."
index += 1 index += 1
if len(reply) > 1800: if len(reply) > 1800:
await ctx.send(reply) await ctx.send(reply)