fix: prioritize recently added anime for relation sync

This commit is contained in:
2026-04-08 14:01:12 +02:00
parent 3b45500b7b
commit a861729476
2 changed files with 2 additions and 0 deletions

View File

@@ -95,6 +95,7 @@ JOIN anime a ON w.anime_id = a.id
WHERE w.status IN ('completed', 'watching')
AND (a.relations_synced_at IS NULL OR a.relations_synced_at < datetime('now', '-7 days'))
GROUP BY a.id
ORDER BY MAX(w.updated_at) DESC
LIMIT 50;
-- name: GetUpcomingSeasons :many

View File

@@ -120,6 +120,7 @@ JOIN anime a ON w.anime_id = a.id
WHERE w.status IN ('completed', 'watching')
AND (a.relations_synced_at IS NULL OR a.relations_synced_at < datetime('now', '-7 days'))
GROUP BY a.id
ORDER BY MAX(w.updated_at) DESC
LIMIT 50
`