fix: vue des series importer

This commit is contained in:
MasutaYunikon committed 2026-04-11 12:19:46 +02:00
1 parent 89f225b980
commit c61bd05f75
1 file changed
+10
+10
View File
@@ -330,6 +330,16 @@ app.get('/api/series/:id', requireAuth, async (req, res) => {
const seasonTorrentMapBySn : Record<number, any> = {}
const integraleTorrents : any[] = []
const organizedEpisodeIds = new Set<number>()
// 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 })