| Summary: | Login to last.fm doesn't work if amarok is run with --debug | ||
|---|---|---|---|
| Product: | [Applications] amarok | Reporter: | robert marshall <robert> |
| Component: | Services/Last.fm | Assignee: | Tuomas Nurmi <tuomas> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | sam, tuomas |
| Priority: | NOR | ||
| Version First Reported In: | 2.9.71 | ||
| Target Milestone: | kf5 | ||
| Platform: | Kubuntu | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/multimedia/amarok/-/commit/4533d9c8f60457a0e4f70a6c0d3bd97ca689514b | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
robert marshall
2024-04-12 07:48:13 UTC
Ok, found the reason. The normal hostname for last.fm API calls is ws.audioscrobbler.com, but in liblastfm, src/ws.cpp, lastfm::ws::host():
QStringList const args = QCoreApplication::arguments();
if (args.contains( "--debug"))
return "ws.staging.audioscrobbler.com";
which is apparently not functional (anymore?).
Yes, I see there's an open PR https://github.com/lastfm/liblastfm/pull/37 Git commit 4533d9c8f60457a0e4f70a6c0d3bd97ca689514b by Tuomas Nurmi. Committed on 12/04/2024 at 11:45. Pushed by nurmi into branch 'master'. Add workaround to enable last.fm debugging. liblastfm checks QCoreApplication::arguments() for "--debug". That's not easy to avoid, so add a synonym debug flag "--debug-last-fm" which has identical functionality in Amarok, but doesn't trigger the non-functional last.fm debug mode. This is not pretty, but it is pretty contained and makes reasonable last.fm bughunting possible. Should https://github.com/lastfm/liblastfm/pull/37 ever get merged, this commit can be reverted, but that might not happen anytime soon as the PR has been pending for 4 years and latest liblastfm release was almost 10 years ago. M +2 -0 src/App.cpp M +1 -1 src/main.cpp https://invent.kde.org/multimedia/amarok/-/commit/4533d9c8f60457a0e4f70a6c0d3bd97ca689514b |