Skip to content

Commit

Permalink
fix: Restore state in track end dispatch for current item
Browse files Browse the repository at this point in the history
  • Loading branch information
angelobreuer committed Feb 6, 2024
1 parent d858bef commit 8a95692
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Lavalink4NET/Players/LavalinkPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ public virtual async ValueTask StopAsync(CancellationToken cancellationToken = d
EnsureNotDestroyed();
cancellationToken.ThrowIfCancellationRequested();

// Store stopped track to restore state information in TrackEnd dispatch
_skippedTrack = CurrentItem;

var properties = new PlayerUpdateProperties
{
TrackData = new Optional<string?>(null),
Expand Down

0 comments on commit 8a95692

Please sign in to comment.