fix(scrap): Correction fallback si scraper KO
This commit is contained in:
1 parent
c6b26d88f0
commit
6348cc40cb
3 files changed
+9
-13
No files matched your search
@@ -58,10 +58,11 @@ router.get('/series/:id', requireAuth, async (req, res) => {
|
||||
const integraleTorrents : any[] = []
|
||||
const organizedEpisodeIds = new Set<number>()
|
||||
|
||||
const manualOrg = organized['manual'] ?? {}
|
||||
// Importé = une entrée pour l'épisode sous n'importe quel hash : les torrents du scraper peuvent disparaître
|
||||
const trackedIds = new Set(Object.values(organized).flatMap(eps => Object.keys(eps)))
|
||||
for (const season of seasonsWithEpisodes) {
|
||||
for (const ep of season.episodes) {
|
||||
if (manualOrg[String(ep.id)]) organizedEpisodeIds.add(ep.id)
|
||||
if (trackedIds.has(String(ep.id))) organizedEpisodeIds.add(ep.id)
|
||||
}
|
||||
}
|
||||
if (serieData) {
|
||||
|
||||
Reference in new issue
Block a user