fix: Erscheinungsdaten nur DE+US, alle Typen 2-5 (Kino/Web/Retail)
This commit is contained in:
@@ -70,17 +70,18 @@ const RELEASE_TYPE_LABEL = { 2:'Kino (limited)', 3:'Kinostart', 4:'Web', 5:'Reta
|
||||
|
||||
function extractReleaseDates(rd) {
|
||||
if (!rd?.results) return [];
|
||||
const PRIORITY = ['DE','US','GB','FR','AT','CH'];
|
||||
// Nur DE und US, Typen 2-5 (kein Premiere=1, kein TV=6)
|
||||
const entries = [];
|
||||
for (const country of PRIORITY) {
|
||||
for (const country of ['DE', 'US']) {
|
||||
const c = rd.results.find(r => r.iso_3166_1 === country);
|
||||
if (!c) continue;
|
||||
for (const r of c.release_dates) {
|
||||
if (!r.release_date) continue;
|
||||
if (!RELEASE_TYPE_LABEL[r.type]) continue; // Premiere+TV überspringen
|
||||
const label = RELEASE_TYPE_LABEL[r.type];
|
||||
if (!label) continue;
|
||||
entries.push({
|
||||
country,
|
||||
label: `${RELEASE_TYPE_LABEL[r.type]} (${country})`,
|
||||
label: `${label} (${country})`,
|
||||
date: r.release_date.slice(0, 10),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user