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:
@@ -3,6 +3,7 @@ import { Card, CardHeader, CardTitle, CardDescription, CardContent, StatBox } fr
|
||||
import { QbittorrentProvider, QbittorrentDownloadButton } from "@/app/components/QbittorrentDownloadButton";
|
||||
import type { DownloadDetectionReportDto, DownloadDetectionResultDto } from "@/lib/api";
|
||||
import type { TranslateFunction } from "@/lib/i18n/dictionaries";
|
||||
import { compressVolumes } from "@/lib/volumeRanges";
|
||||
|
||||
export function DownloadDetectionReportCard({ report, t }: { report: DownloadDetectionReportDto; t: TranslateFunction }) {
|
||||
return (
|
||||
@@ -69,7 +70,7 @@ export function DownloadDetectionResultsCard({ results, libraryId, qbConfigured,
|
||||
<div className="flex items-center justify-between gap-2 mb-2">
|
||||
{libraryId ? (
|
||||
<Link
|
||||
href={`/libraries/${libraryId}/series/${encodeURIComponent(r.series_name)}`}
|
||||
href={`/libraries/${libraryId}/series/${r.series_id ?? encodeURIComponent(r.series_name)}`}
|
||||
className="font-semibold text-sm text-primary hover:underline truncate"
|
||||
>
|
||||
{r.series_name}
|
||||
@@ -97,10 +98,10 @@ export function DownloadDetectionResultsCard({ results, libraryId, qbConfigured,
|
||||
<span className="text-[10px] text-muted-foreground">
|
||||
{(release.size / 1024 / 1024).toFixed(0)} MB
|
||||
</span>
|
||||
<div className="flex items-center gap-1">
|
||||
{release.matched_missing_volumes.map((vol) => (
|
||||
<span key={vol} className="text-[10px] px-1.5 py-0.5 rounded-full bg-success/20 text-success font-medium">
|
||||
T.{vol}
|
||||
<div className="flex flex-wrap items-center gap-1">
|
||||
{compressVolumes(release.matched_missing_volumes).map((range) => (
|
||||
<span key={range} className="text-[10px] px-1.5 py-0.5 rounded-full bg-success/20 text-success font-medium">
|
||||
{range}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -51,7 +51,7 @@ export function MetadataBatchResultsCard({ results, libraryId, t }: {
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
{libraryId ? (
|
||||
<Link
|
||||
href={`/libraries/${libraryId}/series/${encodeURIComponent(r.series_name)}`}
|
||||
href={`/libraries/${libraryId}/series/${r.series_id ?? encodeURIComponent(r.series_name)}`}
|
||||
className="font-medium text-sm text-primary hover:underline truncate"
|
||||
>
|
||||
{r.series_name}
|
||||
@@ -157,7 +157,7 @@ export function MetadataRefreshChangesCard({ report, libraryId, t }: {
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
{libraryId ? (
|
||||
<Link
|
||||
href={`/libraries/${libraryId}/series/${encodeURIComponent(r.series_name)}`}
|
||||
href={`/libraries/${libraryId}/series/${r.series_id ?? encodeURIComponent(r.series_name)}`}
|
||||
className="font-medium text-sm text-primary hover:underline truncate"
|
||||
>
|
||||
{r.series_name}
|
||||
|
||||
@@ -51,7 +51,7 @@ export function ReadingStatusMatchResultsCard({ results, libraryId, t }: {
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
{libraryId ? (
|
||||
<Link
|
||||
href={`/libraries/${libraryId}/series/${encodeURIComponent(r.series_name)}`}
|
||||
href={`/libraries/${libraryId}/series/${r.series_id ?? encodeURIComponent(r.series_name)}`}
|
||||
className="font-medium text-sm text-primary hover:underline truncate"
|
||||
>
|
||||
{r.series_name}
|
||||
@@ -146,7 +146,7 @@ export function ReadingStatusPushResultsCard({ results, libraryId, t }: {
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
{libraryId ? (
|
||||
<Link
|
||||
href={`/libraries/${libraryId}/series/${encodeURIComponent(r.series_name)}`}
|
||||
href={`/libraries/${libraryId}/series/${r.series_id ?? encodeURIComponent(r.series_name)}`}
|
||||
className="font-medium text-sm text-primary hover:underline truncate"
|
||||
>
|
||||
{r.series_name}
|
||||
|
||||
Reference in New Issue
Block a user