From dcccae95a66785a160e419b6cf16a449f6ddf2ba Mon Sep 17 00:00:00 2001 From: chillymosh <86857777+chillymosh@users.noreply.github.com> Date: Wed, 23 Aug 2023 12:01:55 +0100 Subject: [PATCH] Add missing SoundCloudPlaylist checks Add missing SoundCloudPlaylist checks for adding directly to queue --- wavelink/queue.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/wavelink/queue.py b/wavelink/queue.py index 26c65caf..452451dd 100644 --- a/wavelink/queue.py +++ b/wavelink/queue.py @@ -369,7 +369,7 @@ def put(self, item: Playable | spotify.SpotifyTrack) -> None: .. versionchanged:: 2.6.0 - Added support for directly adding a :class:`~wavelink.YouTubePlaylist` to the queue. + Added support for directly adding a :class:`~wavelink.YouTubePlaylist` or :class:`~wavelink.SoundCloudPlaylist` to the queue. """ self._check_playable(item) @@ -585,15 +585,17 @@ async def put_wait(self, item: Playable | spotify.SpotifyTrack) -> None: .. versionchanged:: 2.6.0 - Added support for directly adding a :class:`~wavelink.YouTubePlaylist` to the queue. + Added support for directly adding a :class:`~wavelink.YouTubePlaylist` or :class:`~wavelink.SoundCloudPlaylist` to the queue. + + """ await self._put(item) def put(self, item: Playable | spotify.SpotifyTrack) -> None: """Put the given item into the back of the queue. - If the provided ``item`` is a :class:`~wavelink.YouTubePlaylist`, all tracks from this playlist will be put - into the queue. + If the provided ``item`` is a :class:`~wavelink.YouTubePlaylist` or :class:`~wavelink.SoundCloudPlaylist`, all + tracks from this playlist will be put into the queue. .. note:: @@ -605,11 +607,11 @@ def put(self, item: Playable | spotify.SpotifyTrack) -> None: .. versionchanged:: 2.6.0 - Added support for directly adding a :class:`~wavelink.YouTubePlaylist` to the queue. + Added support for directly adding a :class:`~wavelink.YouTubePlaylist` or :class:`~wavelink.SoundCloudPlaylist` to the queue. """ self._check_playable(item) - if isinstance(item, YouTubePlaylist): + if isinstance(item, (YouTubePlaylist, SoundCloudPlaylist)): for track in item.tracks: super()._put(track) else: