feat: Erscheinungsdaten von xREL (us-cine/de-cine/us-web etc.) statt TMDb
This commit is contained in:
@@ -458,7 +458,6 @@ function FavoritenKalender({ onOpenModal }) {
|
||||
function MovieModal({ tmdbId, onClose, mobile, onHasXrel }) {
|
||||
const [detail, setDetail] = useState(null);
|
||||
const [xrel, setXrel] = useState(null); // null=nicht gesucht, []=gesucht
|
||||
const [xrelDates, setXrelDates] = useState([]);
|
||||
const [xrelLoading, setXrelLoading] = useState(false);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState('');
|
||||
@@ -467,7 +466,7 @@ function MovieModal({ tmdbId, onClose, mobile, onHasXrel }) {
|
||||
const detailRef = useRef(null);
|
||||
|
||||
useEffect(() => {
|
||||
setLoading(true); setDetail(null); setXrel(null); setXrelDates([]); setError('');
|
||||
setLoading(true); setDetail(null); setXrel(null); setError('');
|
||||
detailRef.current = null;
|
||||
api(`/tools/media/movie/${tmdbId}`)
|
||||
.then(d => {
|
||||
@@ -503,7 +502,6 @@ 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); }
|
||||
@@ -582,7 +580,6 @@ function MovieModal({ tmdbId, onClose, mobile, onHasXrel }) {
|
||||
{detail.vote_average > 0 && <Badge bg="rgba(255,230,109,0.15)" color="#ffe66d">★ {detail.vote_average.toFixed(1)}</Badge>}
|
||||
{detail.runtime > 0 && <Badge bg="rgba(255,255,255,0.07)" color="rgba(255,255,255,0.7)">⏱ {detail.runtime} Min</Badge>}
|
||||
{fskStyle && <Badge bg={fskStyle.bg} color={fskStyle.color}>FSK {detail.fsk}</Badge>}
|
||||
{detail.release_date && <Badge bg="rgba(255,255,255,0.07)" color="rgba(255,255,255,0.55)">🇩🇪 {fmtDE(detail.release_date)}</Badge>}
|
||||
{detail.countries?.length > 0 && <Badge bg="rgba(255,255,255,0.07)" color="rgba(255,255,255,0.4)">🌍 {detail.countries.slice(0,2).join(' · ')}</Badge>}
|
||||
</div>
|
||||
{detail.genres?.length > 0 && (
|
||||
@@ -596,11 +593,11 @@ function MovieModal({ tmdbId, onClose, mobile, onHasXrel }) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{xrelDates.length > 0 && (
|
||||
{detail.release_dates?.length > 0 && (
|
||||
<div style={{ marginTop:16 }}>
|
||||
<div style={{ ...S.head, marginBottom:8 }}>ERSCHEINUNGSDATEN</div>
|
||||
<div style={{ display:'flex', flexDirection:'column', gap:4 }}>
|
||||
{xrelDates.map((r, i) => (
|
||||
{detail.release_dates.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