feat(library): add a speedrun mood from speedrun.com
Build, Test & Push Core Service / quality-check (push) Successful in 1m4s
Build, Test & Push Core Service / docker (push) Successful in 1m23s

The picker takes mood=SPEEDRUN for backlog games with a speedrun.com
game that has at least one verified run. The game detail returns the
link as speedrunUrl.

speedrun.com has no Steam or IGDB link, so games are matched by name
and, when IGDB knows it, by release year (one year off at most). One
queue serves all users at 1 request per second. Results are kept 30
days in game_speedrun.
This commit is contained in:
lobo committed 2026-09-26 10:24:22 +02:00
1 parent 3224257325
commit 393cdddf06
27 files changed
+1179 -22

No files matched your search

+10
View File
@@ -50,12 +50,17 @@ app:
client-secret: ${IGDB_CLIENT_SECRET:}
base-url: https://api.igdb.com/v4
token-base-url: https://id.twitch.tv
speedrun:
# No key needed. false stops every call to speedrun.com.
enabled: true
base-url: https://www.speedrun.com/api/v1
library:
sync-ttl-hours: 24
force-sync-cooldown-seconds: 60
running-stale-minutes: 5
achievement-ttl-hours: 1
schema-ttl-days: 30
speedrun-ttl-days: 30
resilience4j:
retry:
@@ -75,6 +80,11 @@ resilience4j:
limit-for-period: 2
limit-refresh-period: 1s
timeout-duration: 5s
speedrunApi:
# speedrun.com allows 100 requests/min per IP.
limit-for-period: 1
limit-refresh-period: 1s
timeout-duration: 30s
igdbApi:
# IGDB allows 4 requests/s. Taken per HTTP request.
limit-for-period: 4
@@ -0,0 +1,9 @@
-- The speedrun.com game per library key (Steam appid, or minus the IGDB id), shared by all users. Only a game with at
-- least one verified run gets an id and weblink. A row with both NULL means no such game was found; it is kept so the
-- game is not asked again before it is stale.
CREATE TABLE game_speedrun (
appid BIGINT PRIMARY KEY,
speedrun_game_id VARCHAR(16),
weblink VARCHAR(512),
checked_at TIMESTAMPTZ NOT NULL
);