fix: renaming dans le managements des series
This commit is contained in:
1 parent
bf3f30356e
commit
1e92934f53
1 file changed
+10
-2
+10
-2
@@ -334,8 +334,16 @@ router.get('/organized-summary', requireAuth, async (_req, res) => {
|
|||||||
for (const ep of season.episodes ?? []) {
|
for (const ep of season.episodes ?? []) {
|
||||||
let orgEntry: any = null
|
let orgEntry: any = null
|
||||||
let orgHash: string | null = null
|
let orgHash: string | null = null
|
||||||
for (const [hash, eps] of Object.entries(organized)) {
|
// Même stratégie que organized/:serieId : on cherche via ep.paths d'abord
|
||||||
if (eps[String(ep.id)]) { orgEntry = eps[String(ep.id)]; orgHash = hash; break }
|
// pour garantir le bon hash → bon formatted_name dans resolveEpNaming
|
||||||
|
for (const p of ep.paths ?? []) {
|
||||||
|
if (typeof p !== 'object' || !p.infohash) continue
|
||||||
|
const h = p.infohash.toLowerCase()
|
||||||
|
const e = (organized[h] ?? {})[String(ep.id)]
|
||||||
|
if (e) { orgEntry = e; orgHash = h; break }
|
||||||
|
}
|
||||||
|
if (!orgEntry && organized['manual']?.[String(ep.id)]) {
|
||||||
|
orgEntry = organized['manual'][String(ep.id)]; orgHash = 'manual'
|
||||||
}
|
}
|
||||||
if (!orgEntry) continue
|
if (!orgEntry) continue
|
||||||
const { currentName, expectedName, needsRename } = computeExpectedName(ep, orgEntry, orgHash, nfoSupport)
|
const { currentName, expectedName, needsRename } = computeExpectedName(ep, orgEntry, orgHash, nfoSupport)
|
||||||
|
|||||||
Reference in new issue
Block a user