mirror of
https://github.com/UiO-Gaming/ShiteMusicBot.git
synced 2026-11-05 13:56:51 +01:00
Fixed bug relating to Auditrack extras and maxlength
:|
This commit is contained in:
1 parent
998d5138f5
commit
f6c4443ad2
1 file changed
+5
-5
+5
-5
@@ -765,11 +765,6 @@ class Music(commands.Cog):
|
||||
async def enqueue(self, ctx, track, embed):
|
||||
player = self.bot.lavalink.player_manager.get(ctx.guild.id)
|
||||
|
||||
if isinstance(track, dict):
|
||||
thumbnail_url = await thumbnailer.ThumbNailer.identify(
|
||||
self, track['info']['identifier'], track['info']['uri'])
|
||||
track = lavalink.models.AudioTrack(track, ctx.author.id, thumbnail_url=thumbnail_url)
|
||||
|
||||
maxlength = self.max_track_length(ctx.guild, player)
|
||||
if maxlength and track['info']['length'] > maxlength:
|
||||
embed.description = ctx.localizer.format_str("{enqueue.toolong}",
|
||||
@@ -777,6 +772,11 @@ class Music(commands.Cog):
|
||||
_max=timeformatter.format_ms(maxlength))
|
||||
return
|
||||
|
||||
if isinstance(track, dict):
|
||||
thumbnail_url = await thumbnailer.ThumbNailer.identify(
|
||||
self, track['info']['identifier'], track['info']['uri'])
|
||||
track = lavalink.models.AudioTrack(track, ctx.author.id, thumbnail_url=thumbnail_url)
|
||||
|
||||
track, pos_global, pos_local = player.add(requester=ctx.author.id, track=track)
|
||||
|
||||
if player.current is not None:
|
||||
|
||||
Reference in new issue
Block a user