From 0a86e70a54a4774423317085944b7c9934c47961 Mon Sep 17 00:00:00 2001 From: Josue Zamudio Date: Wed, 19 Aug 2026 17:32:58 +0000 Subject: [PATCH] fix: backfill posters for ALL history entries; skip when no poster - backfill script deduped by slug_id, so a second entry for the same anime kept no poster -> rendered as a broken - re-backfilled from the already-fetched poster per slug - showHome now only emits an when the entry has a poster --- static/app.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/static/app.js b/static/app.js index 648077b..e544930 100644 --- a/static/app.js +++ b/static/app.js @@ -76,8 +76,10 @@ function showHome() { const sec = el("section", "hero-sec"); const card = el("a", "hero"); card.href = histHref(hero); - const img = el("img"); img.src = hero.poster || ""; img.alt = ""; - card.append(img); + if (hero.poster) { + const img = el("img"); img.src = hero.poster; img.alt = ""; + card.append(img); + } const right = el("div", "right"); const body = el("div", "hero-body"); body.append(el("div", "hero-kicker", "continue watching"), @@ -97,7 +99,10 @@ function showHome() { for (const x of history.slice(1, 6)) { const c = el("a", "card"); c.href = histHref(x); - const i = el("img"); i.src = x.poster || ""; i.alt = ""; + if (x.poster) { + const i = el("img"); i.src = x.poster; i.alt = ""; + c.append(i); + } const info = el("div", "mini-info"); info.append(el("div", "card-name", x.title)); const meta = el("div", "mini-meta"); @@ -105,7 +110,7 @@ function showHome() { info.append(meta); const pb = bar(x, "small"); if (pb) info.append(pb); - c.append(i, info); + c.append(info); grid.append(c); } main.append(grid);