feat: section disponibles au téléchargement + fix nommage import
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 43s

- Endpoint GET /download-detection/latest-found : résultats "found" du
  dernier job de détection par bibliothèque
- Section dans la page Téléchargements avec les releases disponibles
  groupées par bibliothèque, bouton qBittorrent intégré
- Fix nommage import : exclut les volumes importés de la recherche de
  référence (évite le cercle vicieux vol 8 → ref vol 8 → même nom)
- Fix extraction volumes : gère "Tome.007" (point après préfixe) en
  plus de "Tome 007" dans extract_volumes_from_title
- Fallback disque pour la référence de nommage quand la DB ne matche pas
- Logging détaillé du processus d'import pour debug

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-26 22:38:31 +01:00
parent 888db484fb
commit 32078c715a
10 changed files with 303 additions and 15 deletions

View File

@@ -1,9 +1,12 @@
import { fetchTorrentDownloads, TorrentDownloadDto } from "@/lib/api";
import { fetchTorrentDownloads, TorrentDownloadDto, LatestFoundPerLibraryDto, apiFetch } from "@/lib/api";
import { DownloadsPage } from "./DownloadsPage";
export const dynamic = "force-dynamic";
export default async function Page() {
const downloads = await fetchTorrentDownloads().catch(() => [] as TorrentDownloadDto[]);
return <DownloadsPage initialDownloads={downloads} />;
const [downloads, latestFound] = await Promise.all([
fetchTorrentDownloads().catch(() => [] as TorrentDownloadDto[]),
apiFetch<LatestFoundPerLibraryDto[]>("/download-detection/latest-found").catch(() => [] as LatestFoundPerLibraryDto[]),
]);
return <DownloadsPage initialDownloads={downloads} initialLatestFound={latestFound} />;
}