fix(autoplay): make Cancel stop the timer and fix stale cast capture state

This commit is contained in:
Uruk
2026-05-23 23:36:38 +02:00
parent 56e350891d
commit 2c2a7137d3
3 changed files with 48 additions and 13 deletions

View File

@@ -407,6 +407,9 @@ export default function CastingPlayerScreen() {
const autoplayPosterUrl = useMemo(() => {
if (!castAutoplay || !api?.basePath) return null;
const ep = castAutoplay.nextEpisode;
// `BaseItemDto.Id` is `string | undefined`; bail if missing so we never
// call the helper with `undefined`. AutoplayCountdown handles null.
if (!ep?.Id) return null;
return getPosterUrl(api.basePath, ep.Id, ep.ImageTags?.Primary, 260, 390);
}, [castAutoplay, api?.basePath]);