fix: xREL sauber – 1 Cache-Key/Film, Modal sofort, xREL async, Hindi-Filter, max5/≤1080p
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user