Add custom API key support and retry logic for Last.fm import

- Add API key field to Last.fm settings UI with helpful info text
- Store and load custom API key from settings
- Use custom API key in lastfmimport if provided, fall back to default
- Implement exponential backoff retry logic (up to 5 retries)
- Retry on HTTP 500/503 errors with increasing delays (5s, 10s, 20s, 40s, 80s)
- Add retry count tracking to request structures

Co-authored-by: jonaski <10343810+jonaski@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-03 21:24:41 +00:00
parent 8a7a22e9bd
commit 4c8103ef6d
7 changed files with 88 additions and 9 deletions

View File

@@ -113,6 +113,7 @@ void LastFMScrobbler::ReloadSettings() {
s.beginGroup(kSettingsGroup);
enabled_ = s.value(ScrobblerSettings::kEnabled, false).toBool();
api_key_ = s.value(ScrobblerSettings::kApiKey).toString();
s.endGroup();
s.beginGroup(ScrobblerSettings::kSettingsGroup);