[GH-ISSUE #290] Switching tracks no longer working correctly #194

Closed
opened 2026-02-27 19:29:20 +03:00 by kerem · 8 comments
Owner

Originally created by @IsaacWoods on GitHub (Feb 21, 2019).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/290

I've recompiled an application using librespot after a while (it used to work perfectly).

Most of it still works (can still successfully connect, load tracks and stream audio), but switching tracks no longer works correctly. Instead, something like this happens:

  1. Switch to the device using librespot using Connect
  2. A correct PlayerCommand::Load is received
  3. Select another track using official client
  4. Another PlayerCommand::Load is received, but for the previous track (the one already playing, not the one just selected).
Originally created by @IsaacWoods on GitHub (Feb 21, 2019). Original GitHub issue: https://github.com/librespot-org/librespot/issues/290 I've recompiled an application using librespot after a while (it used to work perfectly). Most of it still works (can still successfully connect, load tracks and stream audio), but switching tracks no longer works correctly. Instead, something like this happens: 1) Switch to the device using librespot using Connect 2) A correct `PlayerCommand::Load` is received 3) Select another track using official client 4) Another `PlayerCommand::Load` is received, but for the previous track (the one already playing, not the one just selected).
kerem 2026-02-27 19:29:20 +03:00
  • closed this issue
  • added the
    duplicate
    label
Author
Owner

@thusly commented on GitHub (Feb 21, 2019):

I'm having the same issue, although I actually assumed it was because I hadn't recompiled in ages. This problem started occurring for me yesterday, with a librespot binary that was compiled months ago and had been working fine, otherwise.

I just recompiled to see if the issue would be resolved, and it's still occurring (and here I am). I'm assuming something changed on Spotify's end.

<!-- gh-comment-id:466085560 --> @thusly commented on GitHub (Feb 21, 2019): I'm having the same issue, although I actually assumed it was because I hadn't recompiled in ages. This problem started occurring for me yesterday, with a librespot binary that was compiled months ago and had been working fine, otherwise. I just recompiled to see if the issue would be resolved, and it's still occurring (and here I am). I'm assuming something changed on Spotify's end.
Author
Owner

@devgianlu commented on GitHub (Feb 21, 2019):

librespot-java works fine with Spotify 1.1.0.237.g378f6f25, I can't really tell what's happening.

<!-- gh-comment-id:466102775 --> @devgianlu commented on GitHub (Feb 21, 2019): `librespot-java` works fine with Spotify `1.1.0.237.g378f6f25`, I can't really tell what's happening.
Author
Owner

@forslund commented on GitHub (Feb 21, 2019):

Think this is the same issue as I reported in #288

<!-- gh-comment-id:466132111 --> @forslund commented on GitHub (Feb 21, 2019): Think this is the same issue as I reported in #288
Author
Owner

@IsaacWoods commented on GitHub (Feb 22, 2019):

This is indeed connected to #288 (I didn't realise at first it was to do with the URI stuff).

This is fixed by changing this line to (credit to @worleydl):

let uri = format!("hm://remote/user/{}/", session.username());

I have no idea why this stopped working (maybe API v2 was deprecated internally and so they moved the endpoint?), but this seems to fix it, so closing.

<!-- gh-comment-id:466221958 --> @IsaacWoods commented on GitHub (Feb 22, 2019): This is indeed connected to #288 (I didn't realise at first it was to do with the URI stuff). This is fixed by changing [this line](https://github.com/librespot-org/librespot/blob/master/connect/src/spirc.rs#L217) to (credit to @worleydl): ``` let uri = format!("hm://remote/user/{}/", session.username()); ``` I have no idea why this stopped working (maybe API v2 was deprecated internally and so they moved the endpoint?), but this seems to fix it, so closing.
Author
Owner

@AxelNilsson commented on GitHub (Feb 22, 2019):

This should be reopened, since the master isn't fixed.

<!-- gh-comment-id:466292251 --> @AxelNilsson commented on GitHub (Feb 22, 2019): This should be reopened, since the master isn't fixed.
Author
Owner

@dtcooper commented on GitHub (Feb 22, 2019):

Getting a lot of reports of this re: raspotify#183, but unobserved myself

<!-- gh-comment-id:466339796 --> @dtcooper commented on GitHub (Feb 22, 2019): Getting a lot of reports of this re: [raspotify#183](https://github.com/dtcooper/raspotify/issues/183), but unobserved myself
Author
Owner

@kingosticks commented on GitHub (Feb 22, 2019):

If #288 also fixes this then we don't need two open issues for what is essentially the same thing.

<!-- gh-comment-id:466383632 --> @kingosticks commented on GitHub (Feb 22, 2019): If #288 also fixes this then we don't need two open issues for what is essentially the same thing.
Author
Owner

@sashahilton00 commented on GitHub (Feb 22, 2019):

as @kingosticks said, this is a duplicate. continue discussion in #288.

<!-- gh-comment-id:466389982 --> @sashahilton00 commented on GitHub (Feb 22, 2019): as @kingosticks said, this is a duplicate. continue discussion in #288.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#194
No description provided.