feat: Erscheinungsdaten direkt von xREL (us-cine/de-cine/us-web etc.)
This commit is contained in:
@@ -457,7 +457,8 @@ function FavoritenKalender({ onOpenModal }) {
|
||||
// ── Film-Detail-Modal (via Portal) ────────────────────────────────────────────
|
||||
function MovieModal({ tmdbId, onClose, mobile, onHasXrel }) {
|
||||
const [detail, setDetail] = useState(null);
|
||||
const [xrel, setXrel] = useState(null); // null=nicht gesucht, []=gesucht
|
||||
const [xrel, setXrel] = useState(null); // null=nicht gesucht
|
||||
const [xrelDates, setXrelDates] = useState([]);
|
||||
const [xrelLoading, setXrelLoading] = useState(false);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState('');
|
||||
@@ -502,6 +503,7 @@ function MovieModal({ tmdbId, onClose, mobile, onHasXrel }) {
|
||||
if (forceRefresh) params.set('refresh', '1');
|
||||
const r = await api(`/tools/media/movie/${tmdbId}/xrel?${params}`);
|
||||
setXrel(r.xrel || []);
|
||||
setXrelDates(r.dates || []);
|
||||
if (r.has_xrel) onHasXrel?.(tmdbId);
|
||||
} catch(_) { setXrel([]); }
|
||||
finally { setXrelLoading(false); }
|
||||
@@ -594,11 +596,11 @@ function MovieModal({ tmdbId, onClose, mobile, onHasXrel }) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{detail.release_dates?.length > 0 && (
|
||||
{xrelDates.length > 0 && (
|
||||
<div style={{ marginTop:16 }}>
|
||||
<div style={{ ...S.head, marginBottom:8 }}>ERSCHEINUNGSDATEN</div>
|
||||
<div style={{ display:'flex', flexDirection:'column', gap:4 }}>
|
||||
{detail.release_dates.map((r, i) => (
|
||||
{xrelDates.map((r, i) => (
|
||||
<div key={i} style={{ display:'flex', justifyContent:'space-between', alignItems:'center',
|
||||
fontSize:11, fontFamily:'monospace', padding:'3px 0',
|
||||
borderBottom:'1px solid rgba(255,255,255,0.05)' }}>
|
||||
|
||||
Reference in New Issue
Block a user