Releases: PythonistaGuild/Wavelink
v3.3.0
Version 3.3.0
This release adds the populate
keyword back to Player.play
and has multiple small bug fixes.
Documentation:
https://wavelink.dev
Support:
Discord Server
Caution
You can no longer use a BETA version of Lavalink from version 3.1.0. Please upgrade your Lavalink to a stable version 4+.
Additions
Player.play:
- populate and max_populate
Adds thepopulate
andmax_populate
keyword-only arguments, which allows the auto queue to fetch and fill with recommended tracks based on the played track.
Node.close:
- eject
Adds theeject
keyword argument, which when set toTrue
will remove theNode
from the Pool.
Fixes
- Bug in Queue not repeating a song when set to loop.
- Bug in
Node.close
which wouldn't disconnect currently playing players correctly. - Bug in filters where some arguments were named incorrectly.
- Bug in Queue where using
put_wait
while aget_wait
was waiting for a track would result in allget_wait
hanging. Playlist.extras
property now correctly sets the provided extras on each individual track.
QoL
- Added
typing_extensions
to requirements.
Thanks
v3.2.0
Version 3.2.0
This release adds two main additional features:
Documentation:
https://wavelink.dev
Support:
Discord Server
Caution
You can no longer use a BETA version of Lavalink from version 3.1.0. Please upgrade your Lavalink to a stable version 4+.
Additions
Events:
- on_wavelink_inactive_player()
Called when the Playersinactive_timeout
expires. Useful for disconnecting the bot after a timeframe of no activity.
Utils:
- Playlist.extras
Similar toPlayable.extras
, but this appliesPlayable.extras
to each track in the playlist and on thePlaylist
itself. - Playable.raw_data
The raw payload received from lavalink. You can use this payload to re-build a track later.
Changes
- Queue (Redesign)
- ++ Queue.swap()
- ++ Queue.peek()
- ++ Queue.index()
- ++ Queue.remove()
- ! ! Queue.delete()
- ++ Queue.get_at()
- ++ Queue.put_at()
- ++ Queue.count
- ++ Queue.is_empty
- ++ Queue.loaded
The queue has been redesigned to be more friendly for wavelink use. Internally the queue now uses a list
instead of a deque
. QoL methods and properties have been added to make it easier to manage and use the queue. Please see the documentation for more information and special ways of using the queue. The queue is backwards compatible minus Queue.delete
which is now not asynchronous.
QoL
- Updated the yarl dependency for better support on
Python 3.12+
v3.1.0
Version 3.1.0
This release adds some QoL features that have been frequently requested, and adds support for plugin events.
Documentation:
https://wavelink.dev
Support:
Discord Server
Caution
You can no longer use a BETA version of Lavalink on this release. Please upgrade your Lavalink to a stable version 4+.
Additions
Playable:
- Playable.extras
Updates to supportuserData
field in Lavalink.
Node:
- Node.fetch_info
- Node.fetch_stats
- Node.fetch_version
- Node.fetch_player_info
- Node.fetch_players
All the above endpoints have been made public.
Important
Node.fetch_player_info and Node.fetch_players are not the same as Node.get_player. Please read the documentation before using these endpoints for more details.
Payloads:
- StatsResponsePayload
- PlayerStatePayload
- VoiceStatePayload
- PlayerResponsePayload
- GitResponsePayload
- VersionResponsePayload
- PluginResponsePayload
- InfoResponsePayload
- ExtraEventPayload
These payloads correspond to all the data received in the above endpoints, minus ExtraEventPayload which will be received in the on_wavelink_extra_event event.
Events:
- on_wavelink_extra_event
An event fired when an event that is unknown/unhandled by default is received, usually from Lavalink Plugins.
Warning
Make sure you know the source of your event when using on_wavelink_extra_event. Lavalink does not provide this information by default.
Utils:
- ExtrasNamespace
ExtrasNamespace
is a container class that holds all the information sent to Lavalink via theuserData
field which can be set by passing adict
ofstr
keys toAny
value (Must be convertible to JSON) to Playable.extras. Please see documentation for more details.
Changes
Internally Wavelink now sends a different payload to Lavalink when playing a track or skipping. This is inline with Lavalink changes. Please upgrade your Lavalink to a stable version 4+ if you are currently on a beta version.
v3.0.0
Version 3 🎉
This is the initial release for version 3!
Changes are too big to go over here so please see:
https://wavelink.dev/en/latest/migrating.html
Documentation:
https://wavelink.dev
Examples:
https://github.com/PythonistaGuild/Wavelink/tree/main/examples
Help and Support:
https://discord.gg/RAKc3HF
Issues:
https://github.com/PythonistaGuild/Wavelink/issues
Installing:
https://github.com/PythonistaGuild/Wavelink#installation
Spotify Support is via LavaSrc:
https://github.com/topi314/LavaSrc
Key Notes:
- Pyright Strict
- Lavalink v4+
- Discord.py 2.0.1+
- Python 3.10+
Thank you to everyone who helped out during the development and beta phases <3
Special Thanks to:
@chillymosh
@AbstractUmbra
@Sachaa-Thanasius
v2.6.5
v3.0.0rc1
v2.6.3
Version: 2.6.3
Minor fix for auto_queue where it was raising NotImplementedError on an equality check.
v2.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 SpotifyTrackraise NotImplementedError
in__eq__
for Playable and SpotifyTrack
v2.6.1
Version: 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.
v2.6.0
Version: 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.