The last song of a playlist won't play

Issue description:

When I try to play the last song of a playlist a toast will appear saying something like “preparing you medias, please wait” but then the song simply does not start playing.

This happens both for playlists imported from the provider (jellyfin) and created locally.
When trying to play the song from somewhere else (an album, or after manually searching) the song has no trouble playing (I tested multiple songs).
If I have only a song in a playlist it won’t play either; if I then add the same song to the playlist, the first instance will play and the second (beign the last of the playlist) won’t.

Logs:

Upload description: Cik_last_song

The logs shows me trying to play the same song in a playlist where it’s present twice: the first instance plays, the second won’t (as it’s the last element in the playlist).

Let me know if you need more / different logs.

Reproduction steps:

  • Add one song to a new local playlist
  • Try to play it

Media provider:

Jellyfin

Thanks this is due to a small race because you enabled the smart queue to auto restart playlists that happens when reaching the last song of the playlist and in this case starts too early.

Will be fixed in next release.

Thank you for your quick answer.

I can confirm that’s the case: disabling the smart queue auto restart does restore functionality and is an acceptable workaround while you work on the fix! Thanks again.

EDIT: I just wanted to point out for anybody else stumbling into this that you need to turn the auto restart option off even if the Smart Queue is set to “disabled”