Pace IGDB requests; rewrite the new help text

IGDB allows 4 requests a second, and an import searching three entries
at once (plus detail lookups) went over it. Every IGDB request now waits
at least 300 ms after the last one, and a 429 is retried after 1, 2 and
4 seconds before giving up.

The import dialog, ranking editor and their error messages are reworded
in plainer language, and talk about "spots" instead of "places".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cdnutterandClaude Opus 5.5 committed 2026-10-08 14:51:09 -07:00
1 parent 62fcf6b45d
commit 1f3fa4fb2b
7 files changed
+60 -37

No files matched your search

+9 -5
View File
@@ -74,15 +74,19 @@ type Registry struct {
tvdb *tvdbTokens
igdb *igdbTokens
mb *throttle
// IGDB allows 4 requests a second; stay under it so an import's
// searches and detail lookups don't get answered with 429.
igdbPace *throttle
}
func NewRegistry(creds func(context.Context) Credentials) *Registry {
return &Registry{
creds: creds,
client: &http.Client{Timeout: 20 * time.Second},
tvdb: &tvdbTokens{},
igdb: &igdbTokens{},
mb: &throttle{gap: 1100 * time.Millisecond},
creds: creds,
client: &http.Client{Timeout: 20 * time.Second},
tvdb: &tvdbTokens{},
igdb: &igdbTokens{},
mb: &throttle{gap: 1100 * time.Millisecond},
igdbPace: &throttle{gap: 300 * time.Millisecond},
}
}