From 536e2a4fc62f7bc90dac9cfca4ae7aeb908bc28c Mon Sep 17 00:00:00 2001 From: 4gray Date: Sun, 4 Oct 2026 11:25:49 +0200 Subject: [PATCH] docs(portals): fix stale session-timing comment and search guard wording - serial-details-external-launch.ts: Electron publishes a `launching` session as soon as the launch IPC arrives, not only after the launch settles. Comment only; no behaviour change. - stalker-portal.md: the search host's selection check does not include the content type; a switch to a series supersedes the launch through the playback owner key instead. Co-Authored-By: Claude Fable 5.1 --- docs/architecture/stalker-portal.md | 6 ++++-- .../lib/serial-details/serial-details-external-launch.ts | 9 +++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/architecture/stalker-portal.md b/docs/architecture/stalker-portal.md index f49d0a4a1..cf7c3c7d9 100644 --- a/docs/architecture/stalker-portal.md +++ b/docs/architecture/stalker-portal.md @@ -1599,8 +1599,10 @@ collection detail and search): earlier start, is dropped once a later one begins, and keeps Play, Start over, the watched toggle and the menu rows disabled until it settles. - The resolved stream is discarded when the movie is no longer selected or a - newer start took over. The selection check includes the content type, - because movie and series ids collide. Otherwise the movie's own external + newer start took over. Movie and series ids collide, so the catalog and + collection details include the content type in the selection check; in + search, a switch to a series changes the playback owner instead, which + supersedes the launch. Otherwise the movie's own external session is replaced, the host's `beforeExternalLaunch` hook runs (the catalog and collection details close their inline player there), and the launch is sent. A launch that resolves after either condition changed diff --git a/libs/portal/xtream/feature/src/lib/serial-details/serial-details-external-launch.ts b/libs/portal/xtream/feature/src/lib/serial-details/serial-details-external-launch.ts index 1b7b16a75..699069e5b 100644 --- a/libs/portal/xtream/feature/src/lib/serial-details/serial-details-external-launch.ts +++ b/libs/portal/xtream/feature/src/lib/serial-details/serial-details-external-launch.ts @@ -198,10 +198,11 @@ function closeOwnedEpisodeSession( * still running externally is closed first: with instance reuse off a * second detached player would start beside it. When that close fails, or * the user moved on while it ran, the running player stays and nothing new - * launches. A repeat of the same episode before its launch settled - * (Electron publishes the session only afterwards) is ignored; another - * episode of the series waits for that launch to settle and then replaces - * it like any later start. + * launches. A repeat of the same episode before its launch settled is + * ignored (the session cannot stand in for this guard: Electron publishes + * it only once the launch IPC arrives, as `launching` until that resolves); + * another episode of the series waits for that launch to settle and then + * replaces it like any later start. */ export async function openEpisodeExternally( host: SeriesExternalLaunchHost,