Wavelink

Latest version: v3.3.0

Safety actively analyzes 629564 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 12

2.6.3

Minor fix for auto_queue where it was raising NotImplementedError on an equality check.

v.2.6.2
Version **v.2.6.2**

This version fixes the issue with auto_play queue raising errors when mixing YouTubeTracks and SpotifyTracks.

- `__hash__` has been added to SpotifyTrack
- `raise NotImplementedError` in `__eq__` for Playable and SpotifyTrack

2.6.1

- Player.is_playing() was always returning True, this has now been corrected.

- auto_queue was causing an error for certain songs when using YouTube
- This was due to not every YouTube video having recommended playlists and returned a single track.

2.6.0

- The ability to add YouTubePlaylist directly to the queue with .put or .put_wait
- The asynchronous part of .put_wait also had to be changed to accompany this.
- The autoplay feature now supports YouTube. Simply search for a YouTubeTrack as per usual and set populate=True on .play() while player.autoplay = True. This will now gather recommended songs from YouTube; the behaviour is nearly identical to how the Spotify autoplay feature currently works.
- Spotify and YouTube autoplay features work in tandem.
- The auto_queue threshold was increased from 20 to 100. This internal increase allows a larger variety of tracks to be populated.
- The auto_queue is shuffled each time it is populated. There are multiple reasons this behaviour was implemented. The main 2 are that 1: Searching tracks produces different recommendations and previously would mean a batch of those recommendations would be put at the end of the queue, so searching a metal song followed by a pop song would mean all metal recommended songs would play before any pop songs and 2: If the auto_queue becomes empty and needs to forcefully populate, the last queued batch of recommendations would always be the default search type, this no longer happens and allows for greater variance. It if possible in the future we could implement flags to change the behaviour of this, but in this release I want to focus on the core functionality actually working.
- `__hash__` was added to Playable
- decode_url was implemented within SpotifyTrack.search() internally, which now automatically determines the type and id of the track before searching.
- You can no longer provide the type argument to SpotifyTrack.search().
- If the type is unable to be determined or is unusable, SpotifyTrack.search() will return an empty list.
- Though the SpotifyTrack.iterator will error when a playlist or album URL is not provided, with TypeError

- loop_all has been added to autoplay
- Added spotify.SpotifyTrack to Player.play track argument annotations
- `force` keyword argument to Player.stop. If this is set to True, the player will stop and "skip" the song even when loop is set to True. If this is False and loop is set to True this will stop the song, but continue looping it. Defaults to True
- Logging throughout most of the library has been updated and is now more uniform and detailed. This will allow for better debugging in the future.
- Version checks when connecting to a Node have been changed to allow Wavelink to continue running and connecting when a version mismatch happens. If a version is unknown, wavelink will currently always assume a Major Lavalink version of 3. You will receive a logged warning when this happens.
- Player cleanup logic has been adjusted and changed to be better controlled. This is something that does need a close eye on to monitor whether there are any unwanted side effects of the new behaviour. When a Player is disconnected you will NOT receive track end events for the currently playing track. Instead if you need to, you should handle custom clean-up logic in on_wavelink_websocket_closed.

2.5.1

- Fixed a bug in Spotify Ext where access tokens were not being refreshed in fulfill when autoplay was set. This would eventually result in a 401 Error unless a Spotify Track had been searched for within the last hour.
- Fixed a bug in Spotify Ext due to changes to search with the removal of `return_first`. This would only ocassionally happen when an ISRC was not able to be found on YouTube or YouTube Music.

Documentation: https://wavelink.dev

2.5.0

- `Player.disconnect()` now invalidates the player and discord.py voice client caches as soon as it is called.
- Added `Queue.shuffle()`. This shuffles the queue in-place. E.g. `player.queue.shuffle()`
- Removed `return_first` keyword argument from all tracks including `SpotifyTrack`. Keeping this around has been a poor design choice for wavelink. Previously this resulted in Exceptions being raised if no tracks were found. Now an empty list or a list populated with tracks is always returned. Example of handling tracks:
py
tracks = await wavelink.YouTubeTrack.search(query)
if not tracks:
No tracks were found, handle that here...
...

track = tracks[0]


- Fixed `__eq__` on `SpotifyTrack`.
- Added `__str__` and `__repr__` to `SpotifyTrack`
- Changed: `wavelink.YouTubeTrack/YouTubeMusicTrack` now set the default thumbnail URL to the fetched thumbnail if `.fetch_thumbnail()` is used.
- Changed: If a URL is passed to any `Playable.search()` it is treated as a raw search without the search prefix. This helps make searching services like SoundCloud more precise.

Documentation: https://wavelink.dev

2.4.0

Page 2 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.