mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 18:06:08 -05:00
[Audio] Redefine max length with livestream exception (#3878)
* Redefine max length with livestream exception * Address review * is_track_too_long -> is_track_length_allowed for a more accurate description of what the function actually is doing * we now rely on Track.is_stream for determining whether item is a livestream (or unseekable/non-known audio length like OGG files) for determining whether it can bypass the user-set max track length * Removal of passing track length/an int to is_track_length_allowed - will always pass the full Track object now * Address review
This commit is contained in:
@@ -566,7 +566,7 @@ class AudioAPIInterface:
|
||||
if len(player.queue) >= 10000:
|
||||
continue
|
||||
if guild_data["maxlength"] > 0:
|
||||
if self.cog.is_track_too_long(single_track, guild_data["maxlength"]):
|
||||
if self.cog.is_track_length_allowed(single_track, guild_data["maxlength"]):
|
||||
enqueued_tracks += 1
|
||||
player.add(ctx.author, single_track)
|
||||
self.bot.dispatch(
|
||||
|
||||
Reference in New Issue
Block a user