fix: Build-Fehler JSX, xREL TV-Support mit type:tv Parameter
This commit is contained in:
@@ -837,20 +837,19 @@ function MovieModal({ tmdbId, mediaType='movie', onClose, mobile, onHasXrel, noY
|
||||
detailRef.current = d;
|
||||
setLoading(false);
|
||||
// Gecachte Releases laden (nur für Filme)
|
||||
if (mediaType !== 'tv') {
|
||||
const params = new URLSearchParams({
|
||||
title: d.title || '',
|
||||
orig: d.original_title || '',
|
||||
imdb_id: d.imdb_id || '',
|
||||
year: noYearFilter ? '0' : (d.release_date ? d.release_date.slice(0,4) : ''),
|
||||
});
|
||||
api(`/tools/media/movie/${tmdbId}/xrel?${params}`)
|
||||
.then(r => {
|
||||
if (r.xrel_dates?.length > 0) setXrelDates(r.xrel_dates);
|
||||
if (r.xrel?.length > 0) { setXrel(r.xrel); onHasXrel?.(tmdbId); }
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
const xrelParams = new URLSearchParams({
|
||||
title: d.title || '',
|
||||
orig: d.original_title || '',
|
||||
imdb_id: d.imdb_id || '',
|
||||
year: noYearFilter ? '0' : (d.release_date ? d.release_date.slice(0,4) : ''),
|
||||
media_type: mediaType || 'movie',
|
||||
});
|
||||
api(`/tools/media/movie/${tmdbId}/xrel?${xrelParams}`)
|
||||
.then(r => {
|
||||
if (r.xrel_dates?.length > 0) setXrelDates(r.xrel_dates);
|
||||
if (r.xrel?.length > 0) { setXrel(r.xrel); onHasXrel?.(tmdbId); }
|
||||
})
|
||||
.catch(() => {});
|
||||
})
|
||||
.catch(e => { setError(e.message); setLoading(false); });
|
||||
const prev = document.body.style.overflow;
|
||||
@@ -864,10 +863,11 @@ function MovieModal({ tmdbId, mediaType='movie', onClose, mobile, onHasXrel, noY
|
||||
setXrelLoading(true);
|
||||
try {
|
||||
const params = new URLSearchParams({
|
||||
title: d.title || '',
|
||||
orig: d.original_title || '',
|
||||
imdb_id: d.imdb_id || '',
|
||||
year: noYearFilter ? '0' : (d.release_date ? d.release_date.slice(0,4) : ''),
|
||||
title: d.title || '',
|
||||
orig: d.original_title || '',
|
||||
imdb_id: d.imdb_id || '',
|
||||
year: noYearFilter ? '0' : (d.release_date ? d.release_date.slice(0,4) : ''),
|
||||
media_type: mediaType || 'movie',
|
||||
});
|
||||
if (forceRefresh || noYearFilter) params.set('refresh', '1');
|
||||
const r = await api(`/tools/media/movie/${tmdbId}/xrel?${params}`);
|
||||
@@ -1059,26 +1059,28 @@ function MovieModal({ tmdbId, mediaType='movie', onClose, mobile, onHasXrel, noY
|
||||
</div>
|
||||
) : null;
|
||||
})()}
|
||||
{mediaType !== 'tv' && <div style={{ display:'flex', alignItems:'center', gap:8, marginBottom: xrel?.length ? 8 : 0 }}>
|
||||
<div style={{ ...S.head, marginBottom:0, flex:1 }}>RELEASES (XREL.TO)</div>
|
||||
<button
|
||||
onClick={() => searchXrel(xrel !== null && xrel.length > 0)}
|
||||
disabled={xrelLoading}
|
||||
style={{
|
||||
fontSize:10, fontFamily:'monospace', cursor: xrelLoading ? 'default' : 'pointer',
|
||||
background:'rgba(78,205,196,0.1)', border:'1px solid rgba(78,205,196,0.25)',
|
||||
color: xrelLoading ? 'rgba(255,255,255,0.3)' : '#4ecdc4',
|
||||
borderRadius:6, padding:'3px 10px', flexShrink:0,
|
||||
}}
|
||||
>
|
||||
{xrelLoading ? '⏳ Suche…' : xrel === null ? '🔍 Nach Releases suchen' : '🔄 Erneut suchen'}
|
||||
</button>
|
||||
</div>
|
||||
{mediaType !== 'tv' && xrel !== null && xrel.length === 0 && (
|
||||
<div style={{ fontSize:11, color:'rgba(255,255,255,0.3)', fontFamily:'monospace', fontStyle:'italic' }}>
|
||||
Keine deutschen Releases gefunden
|
||||
<div>
|
||||
<div style={{ display:'flex', alignItems:'center', gap:8, marginBottom: xrel?.length ? 8 : 0 }}>
|
||||
<div style={{ ...S.head, marginBottom:0, flex:1 }}>RELEASES (XREL.TO)</div>
|
||||
<button
|
||||
onClick={() => searchXrel(xrel !== null && xrel.length > 0)}
|
||||
disabled={xrelLoading}
|
||||
style={{
|
||||
fontSize:10, fontFamily:'monospace', cursor: xrelLoading ? 'default' : 'pointer',
|
||||
background:'rgba(78,205,196,0.1)', border:'1px solid rgba(78,205,196,0.25)',
|
||||
color: xrelLoading ? 'rgba(255,255,255,0.3)' : '#4ecdc4',
|
||||
borderRadius:6, padding:'3px 10px', flexShrink:0,
|
||||
}}
|
||||
>
|
||||
{xrelLoading ? '⏳ Suche…' : xrel === null ? '🔍 Nach Releases suchen' : '🔄 Erneut suchen'}
|
||||
</button>
|
||||
</div>
|
||||
{xrel !== null && xrel.length === 0 && (
|
||||
<div style={{ fontSize:11, color:'rgba(255,255,255,0.3)', fontFamily:'monospace', fontStyle:'italic' }}>
|
||||
Keine deutschen Releases gefunden
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{xrel !== null && xrel.length > 0 && (
|
||||
<div style={{ marginTop:4 }}>
|
||||
|
||||
Reference in New Issue
Block a user