feat: table series avec UUID PK — migration complète backend + frontend

Migration DB (0070 + 0071):
- Backup automatique de book_reading_progress avant migration
- Crée table series (fusion de series_metadata) avec UUID PK
- Ajoute series_id FK à books, external_metadata_links, anilist_series_links,
  available_downloads, download_detection_results
- Supprime les colonnes TEXT legacy et la table series_metadata

Backend API + Indexer:
- Toutes les queries SQL migrées vers series_id FK + JOIN series
- Routes /series/:name → /series/:series_id (UUID)
- Nouvel endpoint GET /series/by-name/:name pour lookup par nom
- match_title_volumes() factorisé entre prowlarr.rs et download_detection.rs
- Fix scheduler.rs: settings → app_settings
- OpenAPI mis à jour avec les nouveaux endpoints

Frontend:
- Routes /libraries/[id]/series/[name] → /series/[seriesId]
- Tous les composants (Edit, Delete, MarkRead, Prowlarr, Metadata,
  ReadingStatus) utilisent seriesId
- compressVolumes() pour afficher T1→3 au lieu de T1 T2 T3
- Titre release en entier (plus de truncate) dans available downloads

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-29 22:51:00 +02:00
parent 292e9bc77f
commit ccc7f375f6
38 changed files with 463 additions and 286 deletions

View File

@@ -44,6 +44,7 @@ const SERIES_STATUS_VALUES = ["", "ongoing", "ended", "hiatus", "cancelled", "up
interface EditSeriesFormProps {
libraryId: string;
seriesId: string;
seriesName: string;
currentAuthors: string[];
currentPublishers: string[];
@@ -58,6 +59,7 @@ interface EditSeriesFormProps {
export function EditSeriesForm({
libraryId,
seriesId,
seriesName,
currentAuthors,
currentPublishers,
@@ -199,7 +201,7 @@ export function EditSeriesForm({
}
const res = await fetch(
`/api/libraries/${libraryId}/series/${encodeURIComponent(seriesName)}`,
`/api/libraries/${libraryId}/series/${seriesId}`,
{
method: "PATCH",
headers: { "Content-Type": "application/json" },
@@ -212,12 +214,7 @@ export function EditSeriesForm({
return;
}
setIsOpen(false);
if (effectiveName !== seriesName) {
router.push(`/libraries/${libraryId}/series/${encodeURIComponent(effectiveName)}` as any);
} else {
router.refresh();
}
router.refresh();
} catch {
setError(t("common.networkError"));
}