fix: xREL sauber – 1 Cache-Key/Film, Modal sofort, xREL async, Hindi-Filter, max5/≤1080p

This commit is contained in:
2026-06-10 23:18:28 +02:00
parent 0d819b719c
commit 82ee05f902
2 changed files with 151 additions and 211 deletions

View File

@@ -476,15 +476,14 @@ function MovieModal({ tmdbId, onClose, mobile }) {
useEffect(() => {
setLoading(true); setDetail(null); setXrel(null); setError('');
// TMDb-Daten sofort laden und anzeigen
api(`/tools/media/movie/${tmdbId}`)
.then(d => {
// TMDb-Daten sofort anzeigen
setDetail(d);
setLoading(false);
// xREL ist bereits im response enthalten (Backend lädt parallel)
setXrel(Array.isArray(d.xrel) ? d.xrel : []);
})
.then(d => { setDetail(d); setLoading(false); })
.catch(e => { setError(e.message); setLoading(false); });
// xREL separat und unabhängig nachladen
api(`/tools/media/movie/${tmdbId}/xrel`)
.then(d => setXrel(d.xrel || []))
.catch(() => setXrel([]));
// Body-Scroll sperren
const prev = document.body.style.overflow;
document.body.style.overflow = 'hidden';