mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-28 00:35:55 +03:00
[GH-ISSUE #1281] regression: lyrics API no longer working #586
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#586
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 @gdesmott on GitHub (May 9, 2024).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1281
Trying to fetch lyrics is now failing with:
Client specified an invalid argument { Response status code: 400 Bad Request }I bissected it and this regression has been introduced by
d881f46ce7from @acolombier(Note that you also need https://github.com/librespot-org/librespot/pull/1280 to get lyrics working but it's unrelated to this problem).
@DaXcess commented on GitHub (Jul 1, 2024):
Looks to be an issue with the client token. I either get a
400 Bad Requeston the current dev branch, or, if I revertd881f46, I get a403 Forbiddenerror.I took a little peek at how the client token is retrieved on the newer Spotify versions and it looks like the protobuf data uses the new semantic version (e.g.
1.2.40.599.g606b7f29), however the user agent still uses the protocol version (e.g.124000599).Splitting these into two seperate functions (
version::spotify_version()andversion::spotify_semantic_version()) seems to do the trick. I did test this however with #1220 merged locally, so I'm not 100% certain if it will work without it. I'll do some more testing without login5 and if it seems fine I can make a quick PR to fix the lyrics issue.@DaXcess commented on GitHub (Jul 1, 2024):
Did some more testing. Looks like it does fix this original issue (
400 Bad Requesterrors are gone), however it looks like I'm still experiencing403 Forbiddenerrors. And it's not consistent either, looks like depending on your IP, it does work, or it doesn't. With login5, there is no 403 to be seen, so a full fix might just depend on #1220. Tested using password login.Since it fixes the original issue, I've quickly made a PR: #1303