[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:
aikaterna
2020-06-11 07:38:43 -07:00
committed by GitHub
parent b1d394eac5
commit e3322af384
6 changed files with 13 additions and 15 deletions

View File

@@ -165,7 +165,7 @@ class MixinMeta(ABC):
raise NotImplementedError()
@abstractmethod
def is_track_too_long(self, track: Union[lavalink.Track, int], maxlength: int) -> bool:
def is_track_length_allowed(self, track: lavalink.Track, maxlength: int) -> bool:
raise NotImplementedError()
@abstractmethod