fix: Badge=Release-Cache unified, 3er-Batches parallel, COMPLETE.BLURAY filter korrekt

This commit is contained in:
2026-06-11 01:36:20 +02:00
parent 32447b53a7
commit 8cc0134059
2 changed files with 21 additions and 45 deletions

View File

@@ -303,12 +303,13 @@ function KinoGrid({ onOpenModal }) {
const moviesMeta = movies.map(m => ({ id: m.id, title: m.title, original_title: m.original_title }));
let active = true;
(async () => {
for (const m of moviesMeta) {
for (let bi = 0; bi < moviesMeta.length; bi += 3) {
if (!active) break;
const chunk = moviesMeta.slice(bi, bi + 3);
try {
const result = await api('/tools/media/xrel-check', { method:'POST', body:{ movies: [m] } });
const result = await api('/tools/media/xrel-check', { method:'POST', body:{ movies: chunk } });
if (!active) break;
if (result[m.id]) setXrelIds(prev => new Set([...prev, m.id]));
chunk.forEach(m => { if (result[m.id]) setXrelIds(prev => new Set([...prev, m.id])); });
} catch (_) {}
}
})();
@@ -371,12 +372,13 @@ function DemnächstGrid({ onOpenModal }) {
const moviesMeta = allMovies.map(m => ({ id: m.id, title: m.title, original_title: m.original_title }));
let active = true;
(async () => {
for (const m of moviesMeta) {
for (let bi = 0; bi < moviesMeta.length; bi += 3) {
if (!active) break;
const chunk = moviesMeta.slice(bi, bi + 3);
try {
const result = await api('/tools/media/xrel-check', { method:'POST', body:{ movies: [m] } });
const result = await api('/tools/media/xrel-check', { method:'POST', body:{ movies: chunk } });
if (!active) break;
if (result[m.id]) setXrelIds(prev => new Set([...prev, m.id]));
chunk.forEach(m => { if (result[m.id]) setXrelIds(prev => new Set([...prev, m.id])); });
} catch (_) {}
}
})();