diff --git a/server/index.ts b/server/index.ts index f3868bb..cd497e8 100644 --- a/server/index.ts +++ b/server/index.ts @@ -330,6 +330,16 @@ app.get('/api/series/:id', requireAuth, async (req, res) => { const seasonTorrentMapBySn : Record = {} const integraleTorrents : any[] = [] const organizedEpisodeIds = new Set() + + // Vérifier les imports manuels (clé "manual") pour tous les épisodes de la série + const manualOrg = organized['manual'] ?? {} + if (serieData) { + for (const season of serieData.seasons ?? []) { + for (const ep of season.episodes ?? []) { + if (manualOrg[String(ep.id)]) organizedEpisodeIds.add(ep.id) + } + } + } if (serieData) { for (const t of (serieData.torrents ?? [])) { integraleTorrents.push({ ...t, raw: t.title })