fix(web): series page loads; cast art falls back
ci / web (push) Successful in 34s
e2e / e2e (push) Successful in 57s
ci / rust (push) Successful in 1m9s

This commit is contained in:
Miguel Palhas
2026-08-24 03:21:42 +01:00
parent 1c351eb867
commit 40620d93b4
+12 -4
View File
@@ -1305,6 +1305,12 @@ function castItem(member: MetadataCastMember): HTMLLIElement {
img.src = image;
img.alt = "";
img.loading = "lazy";
// hotlinked art can 404 (§9.6); fall back to the same empty frame a
// person with no photo gets, rather than a broken-image glyph.
img.addEventListener("error", () => {
img.remove();
photo.classList.add("cast-photo-none");
});
photo.append(img);
} else {
photo.classList.add("cast-photo-none");
@@ -3512,16 +3518,18 @@ function seriesMain(board: HTMLElement, tvDeck: TvReleasesView, views: HideableV
}
async function open(id: number, from: HTMLElement, container: HTMLElement, parent: Route) {
// this page is one of `views`, so the loop below calls its own hide(),
// which nulls seriesId — hide first, then take state (same as a movie)
tvDeck.hide();
for (const sibling of views) {
sibling.hide();
}
seriesId = id;
origin = from;
returnTo = container;
parentRoute = parent;
expanded = new Set();
focusKey = null;
tvDeck.hide();
for (const sibling of views) {
sibling.hide();
}
board.hidden = true;
deckEl.hidden = true;
view.hidden = false;