Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes to prevent advance when queue is empty #720

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

tagdara
Copy link
Contributor

@tagdara tagdara commented Oct 4, 2023

One of my use cases plays a track from a list on demand without filling the spotify queue. Currently librespot-java will throw an exception when reaching the end of the queue and attempt to reload the current track as if it is the head of the queue. This causes a number of issues.

  • An exception every time the end of the queue is reached.
  • A reload of the metadata for the existing track, which often does not complete before the next track is added.
  • Race conditions on the reload, and multiple playbackEnded messages on the websocket.

While I've been using elaborate error handling on my client app to resolve these problems, it often results in skipped tracks or no track loaded. These two changes attempt to prevent the loop back to the same track when the queue ends.

werwolf2303 added a commit to werwolf2303/SpotifyXP that referenced this pull request Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant