Skip to content

Commit

Permalink
Add missing SoundCloudPlaylist checks
Browse files Browse the repository at this point in the history
Add missing SoundCloudPlaylist checks for adding directly to queue
  • Loading branch information
chillymosh committed Aug 23, 2023
1 parent 5b612b3 commit dcccae9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions wavelink/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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::
Expand All @@ -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:
Expand Down

0 comments on commit dcccae9

Please sign in to comment.