lavalink-devs / Lavalink

Standalone audio sending node based on Lavaplayer.
https://lavalink.dev/
MIT License
1.58k stars 669 forks source link

StopAsync() doesnt change LavaLinkGuildConnection.Currentstate.Currenttrack to null #937

Closed Koin101 closed 1 year ago

Koin101 commented 1 year ago

Description

When I call the stopAsync function to stop the currentrack such that I can play a new track aka skip. The currentrack state does not get updated and thus when the new song is playing and I want to add a song to my queue it thinks that there is no song playing and it overwrites the currently playing song. Since I check whether currentTrack == null.

To Reproduce

Steps to reproduce the behavior:

  1. Play any song
  2. Use StopAsync() and immediately play a new song or in my case next song in queue
  3. While song is playing, play a new one but check if song is playing using currenttrack.
  4. notice that playing song is overwritten by the new song

Expected behavior

When stopAsync is called it should update currentstate to null.

Version info

Client: DsharpPlus

Output of java -version:

java 17.0.8 2023-07-18 LTS
Java(TM) SE Runtime Environment (build 17.0.8+9-LTS-211)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.8+9-LTS-211, mixed mode, sharing)

Lavalink Logs:

Version:        3.7.8
Build time:     03.08.2023 15:46:57 UTC
Branch          HEAD
Commit:         439f122
Commit time:    03.08.2023 15:32:39 UTC
JVM:            17.0.8
Lavaplayer      1.5.0

Additional context

Maybe it is intended behavior so another way I can check whether there is a song playing such that I know if I need to play the song or add it to the queue

topi314 commented 1 year ago

this is an issue with your client and not lavalink

Koin101 commented 1 year ago

oh oke mb. thank you