Modif
deploy / deploy (push) Successful in 34s

This commit is contained in:
Romain committed 2026-10-04 12:09:35 +02:00
1 parent b555ef3b94
commit 080279e456
22 files changed
+400 -67

No files matched your search

+9 -3
View File
@@ -53,9 +53,15 @@ export default function HomePage({ onOpen, onAdd, onNavigate, onRoulette, onCale
void refreshAiring(items, cache, settings.tmdbKey)
.then((next) => {
saveAiring(next)
const patches = trackable(items)
.filter((i) => i.status !== 'termine' && next[i.id] && next[i.id].aired > (i.episodesTotal ?? 0))
.map((i) => ({ id: i.id, patch: { episodesTotal: next[i.id].aired } }))
const patches = trackable(items).flatMap((i) => {
const info = next[i.id]
if (!info) return []
const patch: Partial<MediaItem> = {}
if (i.status !== 'termine' && info.aired > (i.episodesTotal ?? 0)) patch.episodesTotal = info.aired
// Découpage par saison (nouvelle saison annoncée, ou fiche ajoutée avant le suivi par saison)
if (info.seasonSizes && info.seasonSizes.join() !== (i.seasons ?? []).join()) patch.seasons = info.seasonSizes
return Object.keys(patch).length ? [{ id: i.id, patch }] : []
})
if (patches.length) return patchMany(patches)
})
.catch(() => {})