mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #484] Regression: Playback stops when a blocked song is encountered #305
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#305
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Malvineous on GitHub (May 27, 2020).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/484
I just updated to git master and I have now found that when you are playing a playlist that contains songs blocked in your region, playback now completely stops when it encounters a blocked song. Previously the blocked song would just be skipped, and playback would continue with the next available song.
I've done some investigation and it looks like the problem appeared in commit
5784b465by @kaymes with the changes for gapless playback. It looks like when a blocked song is encountered, player.rs:591 returnsNone, which results in spirc.rs:617 printing an error message and stopping playback completely.It does appear to sometimes skip over the blocked song if gapless playback is enabled, while other times playback continues on the current song but once it finishes, it is no longer possible to start playback again until librespot is restarted.
As a test I changed
spirc.rsto callself.handle_end_of_track()in thePlayerEvent::Stoppedhandler, and this fixed the problem. It is probably not the right solution so I only mention it as confirmation that the issue arises from either incorrectly issuing aPlayerEvent::Stoppedwhen a song is unavailable, or incorrectly reacting to that event.A test album to play to reproduce the problem is: https://open.spotify.com/album/4GYsHZzdfLdwNzRfDQ96vJ It has a couple of playable songs and a few blocked ones, so assuming it's similarly blocked in other regions it's a good test case. Otherwise you can add some normal and blocked songs to a playlist and test with that. If everything is working properly, you should be able to play the album from start to finish with the blocked songs being harmlessly skipped over.
@kaymes commented on GitHub (May 27, 2020):
Isn't this the issue that @ashthespy fixed in #474?
@Malvineous commented on GitHub (May 27, 2020):
Oh sorry it is too - I looked through all the issues but didn't think to check the PRs! Running that PR now to see if it fixes the problem, will post a message there with my results.