diff --git a/src/cogs/audio_cog.py b/src/cogs/audio_cog.py index 17a7608..89a3182 100644 --- a/src/cogs/audio_cog.py +++ b/src/cogs/audio_cog.py @@ -259,23 +259,6 @@ async def __remove_view_and_disconnect(self, player: wavelink.Player): view.remove_view() self.views.pop(guild_id) - # @commands.Cog.listener() - # async def on_wavelink_track_start(self, payload: wavelink.TrackStartEventPayload) -> None: - # """ - # Callback used when new track starts playing - # Used to update embed wherever player changes track - # """ - # player = payload.player - # view = self.views.get(player.guild.id) - # history = player.queue.history - # # Wait for track history update (should happen instantly but sometimes it doesn't) - # while True: - # await asyncio.sleep(0.1) - # if len(history) > 0 and history[-1] == player.current: - # break - - # await view.send_embed() - @commands.Cog.listener() async def on_wavelink_track_end(self, payload: wavelink.TrackEndEventPayload) -> None: """ diff --git a/src/views/audio_player_view.py b/src/views/audio_player_view.py index 7146b07..2691de0 100644 --- a/src/views/audio_player_view.py +++ b/src/views/audio_player_view.py @@ -125,6 +125,8 @@ async def stop_button(self, interaction: discord.Interaction, button: discord.ui player = cast(wavelink.Player, interaction.guild.voice_client) player.queue.clear() await player.skip() + await player.set_filters() + self.filters_applied = False await interaction.response.defer() @discord.ui.button(label='ඞ', style=discord.ButtonStyle.grey, row=0) @@ -307,7 +309,7 @@ def _update_buttons_state(self): self.pause_button.disabled = not player.playing self.skip_button.disabled = not player.playing self.stop_button.disabled = not player.playing - self.filter_button.disabled = False + self.filter_button.disabled = not player.playing self.filter_button.label = amogus if not self.filters_applied else '' self.filter_button.emoji = dancing_black_man if self.filters_applied else None self._update_track_selection_buttons()