librespot-org / librespot-java

The most up-to-date open source Spotify client
Apache License 2.0
384 stars 94 forks source link

Support new format for Expires url parameter in CDN Manager #736

Open tagdara opened 1 year ago

tagdara commented 1 year ago

In the last few days I noticed a number of track crashes or skips and discovered errors in the log similar to this:

2023-10-19 22:39:36,593 WARN CdnManager:186 - Couldn't extract expiration, invalid parameter in CDN url: https://audio4-gm-fb.spotifycdn.com/audio/b2...43?Expires=1697866776~FullPath~hmac=_Pl...t0=

Supported formats previously came in two flavors:

I added support for this new Expires parameter into setUrl in the CDN Manager, matching the format of the code which checks the token version