Skip to content

temporary fixes to CDN feed helper which avoid the broken CDN server - #779

Merged
devgianlu merged 2 commits into
librespot-org:devfrom
tagdara:remove-audio4-cdn
Nov 11, 2023
Merged

temporary fixes to CDN feed helper which avoid the broken CDN server#779
devgianlu merged 2 commits into
librespot-org:devfrom
tagdara:remove-audio4-cdn

Conversation

@tagdara

@tagdara tagdara commented Nov 11, 2023

Copy link
Copy Markdown
Contributor

This is related to the issues in Ssl err #742

Spotify has included a server (audio4-gm-fb) in their CDN rotation which has several issues:

This patch watches for the server to be selected, and when it happens, forces a re-selection. This retains the random logic for CDN selection.

Hopefully Spotify will fix this on the back-end and these patches will no longer be needed

Comment thread lib/src/main/java/xyz/gianlu/librespot/audio/cdn/CdnFeedHelper.java Outdated
@devgianlu

Copy link
Copy Markdown
Member

Thank you!

@devgianlu
devgianlu merged commit 2d6aa02 into librespot-org:dev Nov 11, 2023
@skeller

skeller commented Nov 12, 2023

Copy link
Copy Markdown

FWIW, I cherry-picked this commit into my local copy and librespot-java now works much better & reliable. Now listening for several hours already without any interruptions.
Thanks @tagdara!

@aedeny

aedeny commented Nov 30, 2023

Copy link
Copy Markdown

Thank you!
@tagdara I didn't get much into the code yet, but I think it would be more reliable to catch the CDN failure, and then reselect another CDN server while also keeping a dynamic list of the failed CDNs with some TTL that could be selected again after a few hours / days. I think it's better than having to maintain a list of bad servers in code. I know it's a temp fix, but maybe it's a good aproach for the long-run.

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.

4 participants