feat: add batch metadata jobs, series filters, and translate backoffice to French

- Add metadata_batch job type with background processing via tokio::spawn
- Auto-apply metadata only when single result at 100% confidence
- Support primary + fallback provider per library, "none" to opt out
- Add batch report/results API endpoints and job detail UI
- Add series_status and has_missing filters to both series listing pages
- Add GET /series/statuses endpoint for dynamic filter options
- Normalize series_metadata status values (migration 0036)
- Hide ComicVine provider tab when no API key configured
- Translate entire backoffice UI from English to French

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-18 18:26:44 +01:00
parent 9a8c1577af
commit b955c2697c
46 changed files with 2161 additions and 379 deletions

View File

@@ -36,6 +36,9 @@ pub async fn cleanup_stale_jobs(pool: &PgPool) -> Result<()> {
Ok(())
}
/// Job types processed by the API, not the indexer.
const API_ONLY_JOB_TYPES: &[&str] = &["metadata_batch"];
/// Job types that modify book/thumbnail data and must not run concurrently.
const EXCLUSIVE_JOB_TYPES: &[&str] = &[
"rebuild",
@@ -75,6 +78,7 @@ pub async fn claim_next_job(pool: &PgPool) -> Result<Option<(Uuid, Option<Uuid>)
SELECT j.id, j.type, j.library_id
FROM index_jobs j
WHERE j.status = 'pending'
AND j.type != ALL($3)
AND (
-- Exclusive jobs: only if no other exclusive job is active
(j.type = ANY($1) AND NOT $2::bool)
@@ -96,6 +100,7 @@ pub async fn claim_next_job(pool: &PgPool) -> Result<Option<(Uuid, Option<Uuid>)
)
.bind(EXCLUSIVE_JOB_TYPES)
.bind(has_active_exclusive)
.bind(API_ONLY_JOB_TYPES)
.fetch_optional(&mut *tx)
.await?;