librespot icon indicating copy to clipboard operation
librespot copied to clipboard

Problem playing some playlists

Open almostserious opened this issue 4 years ago • 7 comments

I did observe 2 related issues in the current version:

  1. I am unable to start playing a song of a playlist (if the playlist is very large) like this one: https://open.spotify.com/playlist/0bQjBPRqy5zReJethJy3aP?si=4cIwLUI_RHC47-5kfdbJ_Q

If i start playing it on webplayer, PC or Android and the Spotify Connect to Librespot this song will play usually without a problem.

  1. A lot of times, when the playlist is finally playing, the next song will start but will continuously hang on the first second and repeat itself. This can go for several minutes, or resolve itself shortly. I sometimes get the following WARN message in the log when that happens: [2020-05-14T17:50:54Z WARN librespot_playback::player] Player::seek called from invalid state

almostserious avatar May 14 '20 17:05 almostserious

Thanks for that first link, I can reproduce and confirm this issue.

roderickvd avatar Aug 07 '21 20:08 roderickvd

Zooming into this one, I don't think it's due to the length of the playlist, but the fact that the list starts with a long list of songs that are no longer available. On the desktop clients, it'll look for local files, but obviously that won't work on Connect devices. Are you sure this behaviour isn't the same on official Connect devices?

I've tried a couple of other large playlists (with all songs available) and they play just fine.

Second bullet I am unable to reproduce.

roderickvd avatar Oct 05 '21 18:10 roderickvd

Actually, this playlist was fully playable at that time. I just realized that the underlying albums may have been reuploaded as they are still available, just not in this playlist. Are the other playlists you have tried also Audiobooks?

In any case, currently I cannot create a new playlist to try it as Spotify only allows me to add up to 50 Songs to a new Playlist and skips the rest when adding them.

almostserious avatar Oct 08 '21 13:10 almostserious

Are the other playlists you have tried also Audiobooks?

I don't think so. Could you provide an URL so I can reproduce? If they're audiobooks I also want to rule out that they're not in a format other than Ogg Vorbis (as some podcasts are known to be in MP3).

In any case, currently I cannot create a new playlist to try it as Spotify only allows me to add up to 50 Songs to a new Playlist and skips the rest when adding them.

If you find an existing one to reproduce, do let us know here and we can check it out.

roderickvd avatar Oct 08 '21 13:10 roderickvd

I've noticed that spotify's Bandsplain podcast won't work. Not sure if this is the same problem?

Not sure how to get the URL of the track since librespot won't find any tracks, but here's a link to an episode: https://open.spotify.com/episode/4pU6iIHgc1fHvtCkLQgxrT?si=bmENXjNjQ1mv6rtOH4C9Ig

If I run librespot v0.3.1 as a test, I see this when trying to play an episode (some things redacted):

# librespot -n test -u ... -p ... -v --backend pipe --device /dev/null
[2021-11-17T14:28:46Z INFO  librespot] librespot 0.3.1 c1ac4cb (Built on 2021-11-14, Build ID: zRwrJ0g6, Profile: release)
[2021-11-17T14:28:46Z DEBUG librespot_playback::mixer::mappings] Volume control is now Log(60.0)
[2021-11-17T14:28:46Z DEBUG librespot_discovery::server] Zeroconf server listening on 0.0.0.0:39431
[2021-11-17T14:28:46Z INFO  librespot_core::session] Connecting to AP "guc3-accesspoint-a-krhd.ap.spotify.com:4070"
[2021-11-17T14:28:47Z INFO  librespot_core::session] Authenticated as "..." !
[2021-11-17T14:28:47Z DEBUG librespot_core::session] new Session[0]
[2021-11-17T14:28:47Z INFO  librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0)
[2021-11-17T14:28:47Z DEBUG librespot_connect::spirc] new Spirc[0]
[2021-11-17T14:28:47Z DEBUG librespot_connect::spirc] canonical_username: ...
[2021-11-17T14:28:47Z DEBUG librespot_core::mercury] new MercuryManager
[2021-11-17T14:28:47Z DEBUG librespot_playback::mixer::mappings] Input volume 58958 mapped to: 49.99%
[2021-11-17T14:28:47Z DEBUG librespot_playback::player] new Player[0]
[2021-11-17T14:28:47Z DEBUG librespot_core::session] Session[0] strong=3 weak=2
[2021-11-17T14:28:47Z INFO  librespot_playback::convert] Converting with ditherer: tpdf
[2021-11-17T14:28:47Z INFO  librespot_playback::audio_backend::pipe] Using pipe sink with format: S16
[2021-11-17T14:28:47Z INFO  librespot_core::session] Country: "US"
[2021-11-17T14:28:47Z DEBUG librespot_playback::player] command=AddEventSender
[2021-11-17T14:28:47Z DEBUG librespot_playback::player] command=VolumeSet(58958)
[2021-11-17T14:28:47Z DEBUG librespot_core::mercury] unknown subscription uri=hm://remote/user/.../
[2021-11-17T14:28:47Z DEBUG librespot_core::mercury] unknown subscription uri=hm://remote/user/.../
[2021-11-17T14:28:47Z DEBUG librespot_core::mercury] subscribed uri=hm://remote/user/.../ count=0
[2021-11-17T14:28:47Z DEBUG librespot_connect::spirc] kMessageTypeNotify "..." 68724ecccd67781303655c49a73b74c5968667b1 776788436 1637159327450 kPlayStatusPlay
[2021-11-17T14:28:50Z DEBUG librespot_connect::spirc] kMessageTypeNotify "..." f099bb9fd045bfce259ca0f78898e3ef81827a55 776791518 1637159330532 kPlayStatusPlay
[2021-11-17T14:28:51Z DEBUG librespot_connect::spirc] kMessageTypeLoad "..." f099bb9fd045bfce259ca0f78898e3ef81827a55 776792721 1637159330532 kPlayStatusStop
[2021-11-17T14:28:51Z DEBUG librespot_connect::spirc] State: context_uri: "spotify:show:3uKSgODaDrtWOulcJp57h7" index: 4294967295 position_ms: 0 status: kPlayStatusStop position_measured_at: 1637159331901 context_description: "Bandsplain" shuffle: false repeat: false playing_from_fallback: true
[2021-11-17T14:28:51Z DEBUG librespot_connect::spirc] Frame has 0 tracks
[2021-11-17T14:28:51Z INFO  librespot_connect::spirc] No more tracks left in queue
[2021-11-17T14:28:51Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusStop]
[2021-11-17T14:28:51Z DEBUG librespot_playback::player] command=SetAutoNormaliseAsAlbum(false)
[2021-11-17T14:28:51Z DEBUG librespot_playback::player] command=Stop
[2021-11-17T14:28:52Z DEBUG librespot_connect::spirc] kMessageTypeNotify "..." f099bb9fd045bfce259ca0f78898e3ef81827a55 776793101 1637159332115 kPlayStatusStop
[2021-11-17T14:29:14Z DEBUG librespot_connect::spirc] kMessageTypeNotify "..." 48ee7e889e6f191a6036e090ce8c76e864163ac6 776815228 1637159354242 kPlayStatusStop

The important bits seem to be:

[2021-11-17T14:28:51Z DEBUG librespot_connect::spirc] State: context_uri: "spotify:show:3uKSgODaDrtWOulcJp57h7" index: 4294967295 position_ms: 0 status: kPlayStatusStop position_measured_at: 1637159331901 context_description: "Bandsplain" shuffle: false repeat: false playing_from_fallback: true
[2021-11-17T14:28:51Z DEBUG librespot_connect::spirc] Frame has 0 tracks
[2021-11-17T14:28:51Z INFO  librespot_connect::spirc] No more tracks left in queue

uSpike avatar Nov 17 '21 14:11 uSpike

I have the same problem on the playlist "2000er-Mix".

Mitschmaster avatar Dec 08 '21 19:12 Mitschmaster

Reporting back after some time. The second link contains a show with external episodes. There is a separate issue on this: #818.

The link in the opening post is interesting because between those thousands of unplayable files, there are a few ones that are available. They play on the desktop client, but not on librespot. Strangely librespot does not even receive a message when you try to play it!

Finally, it's different from the externally hosted case. With externally hosted files, when you start playback on the desktop, then want to transfer playback to librespot, librespot will be greyed out saying it cannot play those files. With the first link, when you try do that librespot is available however connecting will literally take forever.

No idea what's going on. Also unsure if the dealer would solve this.

roderickvd avatar Sep 30 '22 20:09 roderickvd