fix(portals): a failed episode launch is reported on its own series only

The series page is reused across titles; a launch that fails after the
viewer moved on is logged but not shown over the new series.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Fable 5.1 committed 2026-10-03 15:03:37 +02:00
1 parent d087cf4d1c
commit 426de69efb
1 file changed
+10 -1
@@ -242,6 +242,8 @@ export class SerialDetailsMenuService {
if (!bindings || !episode) {
return;
}
const seriesId = this.seriesId();
const playlistId = this.xtreamStore.currentPlaylist()?.id;
try {
await bindings.openEpisodeExternally(
episode,
@@ -249,7 +251,14 @@ export class SerialDetailsMenuService {
);
} catch (error) {
this.logger.warn('External episode launch failed', error);
this.notify('PORTALS.PLAYBACK_ERROR');
// The page is reused across series: a failure that lands after
// the viewer moved on is not the new title's problem.
if (
this.seriesId() === seriesId &&
this.xtreamStore.currentPlaylist()?.id === playlistId
) {
this.notify('PORTALS.PLAYBACK_ERROR');
}
}
}