From b6516f2d0943d5383ced885968f492335a8c03c4 Mon Sep 17 00:00:00 2001 From: cloudwithax Date: Tue, 25 Oct 2022 21:20:35 -0400 Subject: [PATCH] change where filters are set to preload --- pomice/player.py | 3 +-- pomice/pool.py | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pomice/player.py b/pomice/player.py index bba7c6b..53b9248 100644 --- a/pomice/player.py +++ b/pomice/player.py @@ -366,11 +366,10 @@ class Player(VoiceProtocol): # Check if theres no global filters and if the track has any filters # that need to be applied + print(f"global filters: {self.filters.has_global}") if not self.filters.has_global and track.filters: # Now apply all filters for filter in track.filters: - # Set preload for filter - filter.set_preload() await self.add_filter(filter=filter) if end > 0: diff --git a/pomice/pool.py b/pomice/pool.py index 949276e..28e2c71 100644 --- a/pomice/pool.py +++ b/pomice/pool.py @@ -305,6 +305,9 @@ class Node: if not URL_REGEX.match(query) and not re.match(r"(?:ytm?|sc)search:.", query): query = f"{search_type}:{query}" + for filter in filters: + filter.set_preload() + if SPOTIFY_URL_REGEX.match(query): if not self._spotify_client_id and not self._spotify_client_secret: raise InvalidSpotifyClientAuthorization(