Xtream and Stalker portal providers
Xtream and Stalker are portal provider types that give IPTVnator access to live channels, radio where available, guide data, movies, series, and playback links. They use the same portal workspace and catalog concepts. Each provider layer adapts connection, catalog, guide, identity, playback, and user-progress rules to its own service. See Provider portal integrations for the wider portal model, Portal catalog and downloads for catalog and download behavior, and Playlist management for saved connection ownership.
Shared portal model
Portal workspace contract
Each provider opens a workspace for one saved portal connection. The workspace owns the active portal, selected content type, category, item, guide state, and playback state together. A route change first changes this owner. A late request then cannot publish data for the previous portal.
Both providers offer the same broad user flow: browse live and catalog content, search, open details, save favorites, view recent items, and start playback. Shared collection and catalog surfaces translate provider data into this common experience without removing provider-specific limits. A collection entry can restore its portal context before it opens a detail or playback view.
This diagram shows how a saved connection becomes provider data and then a common user experience.
flowchart LR
Connection[Saved portal connection] --> Workspace[Provider workspace]
Workspace --> Access[Provider access and session]
Access --> State[Catalog, guide, and user state]
State --> Catalog[Shared catalog and search]
State --> Live[Shared live viewing]
State --> Detail[Provider detail and playback]
References: libs/…/stalker-workspace-route-session.service.ts• L43-63 libs/…/xtream-workspace-route-session.service.ts• L117-177 libs/…/stalker-collection-detail.component.ts• L322-407 libs/…/xtream-collection-detail.component.ts• L126-225 libs/…/portal-catalog-facade.ts• L4-86
Catalog facade
The catalog facade is the boundary between provider state and shared catalog controls. It presents the selected type, category, visible rows, load state, paging, watch state, and portal identity without asking the catalog surface to understand remote response shapes.
Xtream can expose a local catalog that supports in-memory sorting and filtering. Stalker can expose a complete live cache when the portal permits it, but it must also support server pages. The shared contract therefore carries capabilities instead of pretending that both providers have the same catalog control.
References: libs/…/portal-catalog-facade.ts• L4-86 libs/…/xtream-catalog-facade.service.ts• L28-228 libs/…/stalker-catalog-facade.service.ts• L31-212
Live collection
The shared live collection gives favorites and recent channels one provider-neutral view. It resolves a selected channel into playback detail and then joins guide data, catch-up, recording context, and history for the active portal.
The view supports video and radio. A channel enters recent history only after playback is confirmed. A failed stream start therefore does not become a recent item in either provider.
References: libs/…/unified-live-tab.component.ts• L94-242 libs/…/unified-live-selection.ts• L159-295 libs/…/unified-live-epg-view.ts• L89-182
Xtream provider
Xtream data access
Xtream uses a server URL, user name, and password. Its access layer turns account checks, categories, live streams, movies, series, detail data, and guide data into one provider contract. It also accepts common panel differences, such as alternate account responses and older full-guide action names.
The same provider contract supports two runtime paths. Electron can use a local catalog and import remote data when needed. The browser path uses provider data with in-memory caches and local user data. The source does not change the product flow. Favorites, recent items, and playback positions stay separate from display data and remain scoped to the playlist.
Xtream collection references carry content type as well as provider identity. This keeps a live stream, movie, and series with the same provider number from being treated as one item. A collection entry can also recover from a missing local row when its saved identity is still safe to use.
References: libs/…/xtream-api.service.ts• L20-70 libs/…/xtream-api.service.ts• L94-155 libs/…/xtream-api.service.ts• L360-441 libs/…/xtream-data-source.interface.ts• L29-45 libs/…/xtream-data-source.interface.ts• L178-224 libs/…/pwa-xtream-data-source.ts• L55-72
Xtream catalog lifecycle
Xtream content can start from a warm local catalog or from a provider import. The catalog lifecycle tracks enabled content types, categories, content rows, import progress, cancellation, parental locks, and restoration of user state. A refresh replaces provider content without discarding user-owned favorites, recent items, playback positions, or source choices.
Category management separates content visibility from parental locks. Runtime support controls whether users can hide categories. Lock controls remain available where the portal supports protected content, including runtime paths that do not support category visibility.
The lifecycle treats a local read and a remote import as different work. It publishes each content type only when its source is ready. It also blocks unsafe publication while user-state restoration or a lock change is pending. A failed or cancelled import cleans only the remote work owned by that import.
When the provider is unavailable, usable cached content can remain in the workspace with an offline notice. The content gate blocks the route only when initialization or state restoration is not safe. A retry can use the cache again or start a new load.
References: libs/…/with-content.feature.ts• L89-117 libs/…/with-content.feature.ts• L280-305 libs/…/with-content.feature.ts• L580-716 libs/…/with-content.feature.ts• L907-1147 libs/…/xtream-content-gate.component.ts• L27-101 libs/…/category-management-dialog.component.html• L15-18 libs/…/category-management-dialog.component.html• L107-157 libs/…/xtream-deferred-restore.ts• L56-169
Xtream guide data
Xtream guide data serves the selected channel, the live-list preview, and the full guide. The provider can return short rows or a full schedule. The guide layer normalizes response shapes, encoded text, provider timestamps, and the panel time zone.
The full guide can use an uploaded XMLTV source. A channel mapping chooses the matching uploaded schedule. The user's source preference decides which source is tried first. If that source has no usable rows, the other source can fill the gap. Source changes, mapping changes, playlist changes, and display-clock changes invalidate old guide results.
The live guide reads schedules through a bounded cache. Preview requests first resolve playlist-scoped manual mappings in one batch, then use the selected uploaded or provider source. Cache entries and results are scoped to the active Xtream account and provider clock, so a playlist change or clock-offset change cannot reuse another account's programme window. The live surface rechecks the current programme against the provider clock instead of relying only on the time when the schedule was loaded.
This diagram shows how Xtream guide data reaches both the live panel and the full guide.
flowchart TD
Channel[Selected or visible channel] --> Short[Short provider guide]
Channel --> Full[Full provider schedule]
Full --> Source{Guide source preference}
Uploaded[Uploaded XMLTV schedule] --> Source
Source --> Normalize[Normalized guide rows]
Normalize --> LivePanel[Live panel and now playing]
Normalize --> Guide[All, favorites, or category guide]
Guide --> Archive[Catch-up and archive actions]
References: libs/…/xtream-full-epg.service.ts• L21-54 libs/…/xtream-xmltv-fallback.service.ts• L49-75 libs/…/xtream-xmltv-fallback.service.ts• L124-161 libs/…/xtream-xmltv-program.util.ts• L3-28 libs/…/epg-queue.service.ts• L43-59 libs/…/epg-queue.service.ts• L121-170 libs/…/epg-queue.service.ts• L183-247 libs/…/epg-queue.service.ts• L314-407 libs/…/with-epg.feature.ts• L147-233 libs/…/xtream-guide-schedules.ts• L63-197
Xtream live viewing
The Xtream live surface combines all-channel browsing, category browsing, search, sorting, guide data, and playback. It can show a channel's current programme, a past programme through catch-up, and recording context when the channel and account support those features.
The live view can open a channel handed off from another workspace after the target playlist and catalog are ready. It keeps channel, category, guide, and playback ownership together so external-player changes, remote channel actions, and return from catch-up stay tied to the same live source.
The live workspace keeps several navigation levels available. Users can expand the category rail, fold it into a category chooser, show all live items, or reduce the view to the player. The workspace preserves a clear route back at each level and keeps the channel controls separate from the player area.
The full guide adds all-channel, favorite, and category scopes. Schedules stay tied to the current playlist and channel copy. A cached schedule can continue to describe the confirmed channel while the user changes the visible browse scope.
Live playback has two product paths. An embedded player can show the selected stream directly. An external player uses an owned session that tracks the playlist, channel, category, guide programme, and launch state. A new tune waits for an old owned launch to close before it starts. A late or failed launch cannot replace a newer one. A parental-lock change stops playback when its channel becomes withheld.
References: libs/…/live-stream-layout.component.ts• L182-317 libs/…/live-stream-layout.component.ts• L627-767 libs/…/live-stream-layout.component.ts• L776-854 libs/…/live-stream-layout.component.ts• L936-1101 libs/…/live-stream-layout.component.ts• L1128-1157 libs/…/live-stream-layout.component.html• L5-147 libs/…/live-stream-layout.component.html• L219-297 libs/…/live-stream-layout.sidebar-levels.spec.ts• L249-436 libs/…/xtream-guide-schedules.ts• L96-197 libs/…/xtream-tune-requests.service.ts• L36-164
Xtream archive and recording
Xtream archive actions turn guide programmes into catch-up playback, copied links, or downloads. They are available only when the channel reports an archive window and the programme is within that window.
The archive action keeps the programme's channel, start, stop, playlist, and request headers together. This lets recording enrichment and downloads use the programme that the user selected instead of the channel that happens to be visible later.
Live recording metadata uses the selected channel and the programme that is current at recording start. When recording stops, guide enrichment applies only to programmes that overlap the recorded interval and still belong to that channel.
References: libs/…/xtream-live-archive-actions.ts• L20-65 libs/…/xtream-live-archive-actions.ts• L68-147 libs/…/live-stream-layout.component.ts• L288-346 libs/…/live-stream-layout.component.ts• L1128-1157
Xtream detail and playback state
Xtream movie and series details use provider data first. They can add presentation data from TMDB. Provider identity stays separate from enriched titles, artwork, and credits. If a detail response does not contain a usable playback source, the detail flow can recover the matching catalog item before it enables playback, favorites, resume, or downloads.
VOD details can also choose another copy of the same title from a different playlist. The primary action follows the selected copy, so its resume position and playback source stay aligned. A position belongs to a playlist and content type. A newer detail or playback request owns the result, so an older response cannot decorate or start the current item.
Series playback uses the current playlist, series, and page visit as its ownership boundary. A new episode choice can replace an external launch after the earlier launch settles. A launch or position update from an old visit cannot change the series now on screen.
Movie downloads use the resolved provider source when a detail response is sparse. The download keeps a stable playlist and content identity with a metadata snapshot. The detail page can show progress, resume a paused transfer, reveal or play the finished file, and ask for confirmation before cancellation.
References: libs/…/xtream-details-request.ts• L70-224 libs/…/xtream.store.ts• L133-365 libs/…/serial-details-playback.service.ts• L74-189 libs/…/serial-details-playback.service.ts• L240-292 libs/…/serial-details-playback.service.ts• L315-437 libs/…/vod-details-playback.service.ts• L168-221 libs/…/vod-details-playback.service.ts• L372-471 libs/…/vod-details-downloads.service.ts• L46-141 libs/…/vod-details-downloads.service.ts• L143-297 libs/…/vod-primary-action-position.ts• L12-166
Xtream series progress
Series details provide episode playback, resume, quick start, next and previous navigation, and inline or external playback. The page can mark one episode, a season, or a whole series as watched or unwatched. These changes update both the detail view and the catalog's progress state.
Playback positions use episode identity together with the playlist and series. Browser storage also records reset scopes for a series or season when native playback may report an older checkpoint. This prevents a late native update from restoring progress that the user cleared.
References: libs/…/serial-details-playback.service.ts• L77-132 libs/…/serial-details-playback.service.ts• L252-325 libs/…/serial-details-season-watch.service.ts• L26-125 libs/…/serial-episode-playback.ts• L30-68 libs/…/pwa-playback-positions.ts• L45-83 libs/…/pwa-android-playback-resets.ts• L18-75
Stalker provider
Stalker endpoint and session model
Stalker uses a portal URL and a device identity, usually a MAC address. The access layer discovers the working endpoint from portal responses. Some portals serve content without a token. Others require a handshake, profile exchange, and optional login before content is available.
Discovery tries candidate endpoints in order and classifies transport, response, authentication, and abort outcomes. The resulting session keeps the normalized device identity, token, portal mode, and account information together. A saved token is reused only when it still belongs to the current device and portal configuration.
The active Stalker workspace uses a repaired endpoint and mode when lazy repair corrects the saved portal data. Route reactivation therefore does not restore stale connection details. On supported desktop runtimes, the active Stalker playlist is also made available to local playback-position storage.
References: libs/…/stalker-portal-discovery.service.ts• L20-100 libs/…/stalker-portal-discovery.service.ts• L129-357 libs/…/stalker-auth.utils.ts• L42-65 libs/…/stalker-session-store.ts• L18-85 libs/…/with-stalker-portal.feature.ts• L39-121
Stalker live catalog
Stalker organizes live content as ITV channels and radio. The catalog first tries to build a complete ITV view for the active portal. It uses the portal's full-channel action when available and falls back to ordered pages when needed. If a portal cannot provide a complete list, the regular paged view remains the source of truth.
The full ITV cache belongs to the portal connection, including its device identity and observed mode. It has its own readiness, progress, refresh, and unsupported states. A failed crawl enters a short retry delay instead of starting an unbounded reload loop. Some portals omit genres from the full response. The live surface can load a missing genre through ordered pages and merge unique channels.
The live view therefore supports local search, category counts, a bounded render window, guide previews, and list or grid presentation when the full cache is ready. It keeps the same playback and guide controls when it falls back to server paging.
The active playlist can retain hidden-category choices without treating them as parental locks. Hidden choices control what the user sees. Locks control whether protected content may be opened or played.
References: libs/…/stalker-itv-cache.service.ts• L20-35 libs/…/stalker-itv-cache.service.ts• L70-162 libs/…/stalker-itv-cache.service.ts• L164-237 libs/…/stalker-itv-genre-loader.ts• L11-58 libs/…/stalker-paged-client.ts• L12-113 libs/…/stalker-live-stream-layout.component.ts• L226-356 libs/…/stalker-itv-all-items.component.ts• L52-187 libs/…/with-stalker-portal.feature.ts• L39-70
Stalker catalog paging and search
Stalker portals choose their own server page size and may return different page envelopes. The paging boundary converts those pages into bounded client pages without skipping rows. It validates row shape, keeps a small request cache, and stops when the provider total or a real empty page says that the list is complete.
VOD and series search can combine server pages from both the series and VOD catalogs. The result keeps the search term, content kind, portal, and parental-lock state as its identity. A failed first page reports an error. A failed append keeps earlier rows and retries the same page. Locked rows, duplicate pages, malformed responses, and stalled pages cannot make the view report false completeness.
Search opens movie or series details without leaving the result view. It restores the result position when the detail closes and retires playback work when the selected item or content kind changes. If a lock hides the selected item's category, the detail and its playback state close with the row.
References: libs/…/stalker-paged-client.ts• L17-113 libs/…/stalker-search-page.ts• L19-108 libs/…/stalker-second-stream.service.ts• L80-203 libs/…/stalker-search-paging.controller.ts• L47-243 libs/…/stalker-search-paging.controller.ts• L246-449 libs/…/stalker-search.component.ts• L242-467 libs/…/stalker-search.component.ts• L541-548
Stalker content identity
Stalker responses do not use one stable field for provider identity. The data layer selects the first usable ID and keeps the content kind and series mode with it. Favorites and recent items therefore distinguish live, radio, movie, regular series, embedded series, and flagged VOD series even when numeric IDs collide.
Sparse favorites and recent entries can be hydrated in the background with artwork and description from the active portal. The initial collection remains readable during that lookup. The service accepts the result only while the same portal, device, source revision, and lock state still own the item. It does not copy a playback command into a saved display snapshot.
If a saved item has no command, the playback resolver searches the matching portal catalog. It accepts one unambiguous match and rejects locked or conflicting matches. This lets synced or old favorites remain useful without allowing a reused provider ID to start the wrong stream.
References: libs/…/stalker-vod.utils.ts• L66-125 libs/…/stalker-vod.utils.ts• L144-307 libs/…/stalker-collection-metadata.service.ts• L33-175 libs/…/stalker-favorite-playback.service.ts• L24-191 libs/…/stalker-favorites-button.component.ts• L42-131 libs/…/stalker-favorite-item.interface.ts• L8-77
Stalker series content
Stalker series can arrive as regular series, VOD with embedded episodes, or VOD marked as a series that needs lazy season loading. The detail view presents these forms through one season and episode experience. It loads only the provider data needed for the selected form.
Lazy season loads are shared when a tab click, resume handoff, quick start, or up-next view asks for the same season. Saved progress can hydrate pending regular seasons in order. While an episode plays, the next season can load in advance so up-next navigation does not stop at the current season. An empty answer counts as loaded. A failed answer remains retryable without repeating the same request in a loop.
The series flow can browse both series and VOD sources when the provider splits related content across them. It stops on a real end, duplicate page, malformed row, or no-progress page instead of showing a truncated season or requesting pages forever. A malformed season response is not treated as a real empty season. Provider episode commands remain separate from display episode IDs.
Playback positions are reconciled to the current episode identity. Older rows can be reused only when their series, season, and episode coordinates match. The current scoped position is saved first. A compatible legacy row is then removed. If cleanup fails, the saved scoped position remains valid and the caller can report a partial save.
The inline player prepares the next unopened lazy season for its up-next rail. A successful empty answer counts as loaded. A failed prefetch can retry after the user moves to another episode without creating a request loop.
Playback belongs to the playlist, parent series, series form, and logical episode coordinates. This keeps a mounted episode stable when provider commands or display metadata refresh. It also clears stale playback when the playlist, parent series, or series form changes.
References: libs/…/stalker-second-stream.service.ts• L205-295 libs/…/with-stalker-series.feature.ts• L89-181 libs/…/with-stalker-series.feature.ts• L228-289 libs/…/stalker-vod-season-episode-loader.ts• L23-170 libs/…/stalker-series-quick-start.ts• L39-179 libs/…/stalker-series-view.component.ts• L731-930 libs/…/stalker-series-view.component.ts• L983-1079 libs/…/stalker-series-view.component.ts• L1180-1323 libs/…/stalker-series-view.playback-session-key.spec.ts• L392-496 libs/…/stalker-series-view.spillover-prefetch.spec.ts• L37-303
Stalker detail and playback
Stalker detail pages support movies and all three series forms. They provide metadata, favorites, resume, watched state, inline playback, external playback, quick start, up-next navigation, and downloads when the portal can resolve the needed command.
The playback layer turns a provider command into a playable link. A static link on a foreign host is used without portal authentication. A portal-owned link can warm or repair the Stalker session before it plays. Dynamic links use the endpoint that answered the request. Portal credentials, origin, and referrer headers are not sent to a foreign stream host.
Playback requests and position reads are owned by the current item. A result for a closed detail page cannot mount in a newer one. Recent history is updated after playback succeeds. Collection, search, and catalog details use the same lookup and lock rules, so a sparse saved item can recover current provider metadata before it plays.
References: libs/…/stalker-player-request.utils.ts• L60-152 libs/…/with-stalker-player.feature.ts• L151-274 libs/…/with-stalker-player.feature.ts• L277-459 libs/…/stalker-vod-playback-controller.ts• L32-193 libs/…/stalker-catalog-detail.component.ts• L80-194 libs/…/stalker-second-stream.service.ts• L297-379
Stalker guide data
Stalker guide data supports the selected ITV channel and live-list previews. The provider may return a short guide for one channel or a bulk schedule. The data layer normalizes channel identity and time fields before the live surface merges those rows with local XMLTV mappings.
A mapped XMLTV channel owns its guide source even when the mapping currently has no rows. This prevents portal data from replacing a user's chosen source. Guide state is scoped to the active portal and period. An old result therefore cannot enter a new portal.
References: libs/…/with-stalker-epg.feature.ts• L63-80 libs/…/with-stalker-epg.feature.ts• L128-183 libs/…/with-stalker-epg.feature.ts• L238-307 libs/…/with-stalker-epg.feature.ts• L318-485
Stalker catalog progress
Stalker catalog progress overlays playback positions on paged movie and series rows. Movies show their own progress. Series rows show whether an episode has progress. Watched filtering can hide completed VOD rows after the position snapshot is ready.
Series progress supports both current scoped IDs and compatible older tracking IDs. A failed position refresh keeps the last usable snapshot and exposes retry state instead of treating missing history as empty history. Hidden-row scans use a bounded page budget. A portal that returns only withheld rows cannot cause endless requests.
References: libs/…/stalker-catalog-positions.ts• L24-161 libs/…/stalker-catalog-watch-filter.ts• L5-173 libs/…/stalker-series-positions.ts• L41-101 libs/…/stalker-series-position-compatibility.ts• L35-103
Test-server counterparts
Xtream mock server
The Xtream mock server is a local stand-in for account, catalog, detail, guide, stream, browser-proxy, and asset requests. Credential pairs select stable scenarios such as small or large catalogs, expired accounts, incomplete metadata, and catalogs shared by more than one portal.
These scenarios let account checks, browser transport, catalog loading, playback, downloads, demos, and performance flows use the same request shapes as a remote Xtream service.
References: apps/…/README.md• L1-5 apps/…/README.md• L105-175 apps/…/dispatch.ts• L10-51 apps/…/server.ts• L66-127 apps/…/server.ts• L219-343
Stalker mock server
The Stalker mock server models both token-free and full portal behavior. Tolerant endpoint paths represent a reseller panel that serves content without a token. Strict paths represent a portal that requires the expected device identity and a Bearer-token session.
MAC-address scenarios select stable protocol and content data. They cover deep series, embedded and flagged VOD series, legacy live paging, login-required profiles, credential-gated streams, direct channel commands, marketing live data, browser proxy access, and scoped reset behavior.
References: apps/…/README.md• L3-11 apps/…/README.md• L33-98 apps/…/portal.route.ts• L5-22 apps/…/dispatch.ts• L18-103 apps/…/marketing-live.generator.ts• L11-89
Provider comparison
The two provider layers aim to give users the same browse and viewing flow. They differ in connection identity, session setup, catalog control, guide sources, playback link rules, and the certainty available from remote data.
| Area | Xtream | Stalker |
|---|---|---|
| Connection identity | Server URL, user name, and password | Portal URL, device identity, and optional login credentials |
| Remote access | Action-based API | Observed endpoint actions with token-free or full sessions |
| Main content | Live, movies, series, and guide data | ITV, radio, movies, series, and guide data |
| Catalog control | Local cache or import with local sort and filters | Full ITV cache where possible with server paging as fallback |
| Guide fallback | Uploaded XMLTV can replace or fill provider guide data | Mapped XMLTV can replace portal guide data for a channel |
| Playback link | Provider stream path or validated direct source | Static, repaired, or provider-created command link based on stream ownership |
| Runtime data source | Electron database-first or browser API-first | Shared session and portal repair rules |
| User state | Typed collections and playlist-scoped positions | Playlist-scoped favorites, positions, and provider identity |
Change checklist
When these files or sections are changed, remember to consider these:
- Keep shared catalog capability flags aligned with Xtream's local controls and Stalker's cache or paging limits.
- Keep route-session ownership aligned with playlist installation, source edits, auto-open handoffs, guide reads, and playback launches.
- Keep Xtream source selection aligned with enabled content types, cache hydration, import cancellation, lock filtering, and user-state restoration.
- Keep Xtream category visibility separate from parental-lock state. A runtime may support locks without supporting category hiding.
- Keep Xtream guide selection aligned with provider time zones, uploaded-source priority, mappings, source revisions, schedule cache invalidation, and visible guide scopes.
- Keep Xtream live guide previews aligned with playlist-scoped manual mappings, account ownership, provider-clock offsets, queue generations, and visible channels.
- Keep Xtream live tuning aligned with channel-copy identity, external-session ownership, close-before-tune ordering, archive context, and parental-lock enforcement.
- Keep Xtream live handoffs aligned with target playlist readiness, auto-open history state, remote channel context, recording channel identity, and guide ownership.
- Keep Xtream typed favorites aligned with the catalog copy used by the live guide and collection views.
- Keep Xtream detail recovery aligned with provider identity, category lookup, playback-source selection, resume state, alternate sources, and downloads.
- Keep Xtream episode progress aligned with playlist and series identity, batch watched changes, native reset scopes, and catalog refreshes.
- Keep Stalker full ITV cache keys aligned with portal URL, device identity, credentials, observed mode, refresh state, and unsupported outcomes.
- Keep Stalker route activation aligned with repaired endpoint and mode data, watchdog ownership, category visibility, and desktop playlist-position sync.
- Keep Stalker genre loading aligned with full-list omissions, ordered-page totals, duplicate IDs, cancellation, and no-progress guards.
- Keep Stalker normalization aligned with provider identity, content kind, series mode, temporary-link flags, collection metadata, and playback lookup.
- Keep Stalker favorite matching aligned with portal context, content kind, blank-ID aliases, locked categories, and command ambiguity.
- Keep Stalker search detail state aligned with the selected content kind, result scroll restoration, playback ownership, and lock-driven detail closure.
- Keep Stalker series mode aligned with regular, embedded, and flagged VOD forms, lazy seasons, single-flight loads, resume targets, spillover prefetch, and up-next playback.
- Keep Stalker position migration aligned with series identity, provider and display coordinates, scoped saves, legacy cleanup, and partial-save reporting.
- Keep Stalker playback request profiles aligned with stream ownership. Portal credentials must not reach a foreign stream host.
- Keep Stalker EPG mapping ownership aligned with the active playlist, source revision, empty mapped guides, and short-EPG fallback.
- Keep mock-server credentials and MAC identities aligned with the provider scenarios that exercise them.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A provider response completes after the active playlist changes | Old catalog, guide, or detail data appears in the new portal | Publish only when playlist, source, and request identity still match |
| A repaired Stalker endpoint is lost when the route reactivates | The session watchdog or playback uses stale portal data | Activate the repaired playlist state and keep its session owner current |
| Xtream initialization publishes cached rows while restore or lock work is pending | User state or protected rows are lost or shown | Gate publication until restoration and current lock filtering settle |
| Xtream category visibility and parental locks share one state contract | A runtime hides categories when it should only apply locks, or loses protected rows | Keep visibility capability and lock state separate |
| Xtream guide data uses an old source, mapping, or provider clock | The guide shows a wrong programme or stale channel schedule | Use source revisions, playlist ownership, mapping keys, and normalized provider time |
| An Xtream EPG preview returns for another account or clock offset | A visible channel shows another playlist's programme or an old time window | Scope queue state to account and offset, then discard stale generations |
| An Xtream full-guide request uses an older panel action | Full guide data appears empty even though the panel supports it | Try the documented action and the known legacy action when the response permits |
| An Xtream external tune is replaced before the old launch closes | The wrong channel remains active or a late launch replaces the new one | Track owned launches and wait for close-before-tune completion |
| A live handoff resolves before the target playlist is ready | A colliding stream ID opens from the previous playlist | Consume auto-open state only after the requested playlist catalog is initialized |
| A relock hides the category of an active live session | Protected content continues to play | Recheck the session's captured category on lock changes |
| An Xtream detail has no playable source | Favorite, resume, playback, or download actions fail | Recover the matching catalog row under the current playlist before enabling actions |
| An Xtream movie download uses a sparse route ID as its only identity | The transfer cannot resolve or later match the actual provider stream | Use the resolved source ID when the route detail is sparse |
| A bulk Xtream watched change completes after the page moves to another series | Old episode rows or feedback appear on the new page | Apply view state only while the playlist and series identity remain current |
| A native playback checkpoint arrives after an Xtream reset | Cleared progress returns | Compare checkpoint time with item, season, series, and playlist reset stamps |
| A Stalker token is reused after device or portal identity changes | The portal rejects or misbinds the session | Reuse saved sessions only when the normalized identity matches |
| A Stalker portal cannot provide a complete ITV list | Local search reports incomplete content or reloads forever | Mark the full cache unsupported, use ordered paging, and apply the error cooldown |
| A Stalker genre is omitted from the full list | Channels disappear from that category | Load the genre through ordered pages and deduplicate its rows |
| A Stalker favorite has a reused ID or no command | The wrong item is opened or played | Match portal content kind and require one unlocked, unambiguous catalog result |
| A Stalker search detail remains open after its category becomes withheld | Protected metadata or playback actions remain visible | Clear detail, selection, and inline playback when the lock removes its category |
| A Stalker series page repeats rows or stops before its total | The detail shows a truncated season or keeps loading | Check totals, duplicate progress, malformed rows, cancellation, and no-progress limits |
| A lazy Stalker season is requested by several features at once | Portal traffic is duplicated or one failure hides a valid load | Share one load per portal, series, and season owner |
| A lazy season prefetch treats an empty answer as a failure | Up-next asks for the same empty season on every playback update | Record a valid empty answer as loaded |
| A legacy Stalker episode position has incompatible coordinates | Progress appears on the wrong episode | Reuse legacy progress only when series, season, and episode coordinates agree |
| Legacy position cleanup fails after a scoped save | Duplicate progress rows remain | Report a partial save while retaining the new scoped position |
| A Stalker playback link points to a foreign host | Portal credentials or headers reach an unsafe host | Classify stream ownership before building the request profile |
| A mapped Stalker channel has an empty uploaded guide | Portal programmes replace the user's selected source | Treat mapping ownership as active even when its guide has no rows |
| A hidden-row Stalker scan receives only locked rows | Paging sends unbounded requests | Stop at the hidden-page budget and require explicit continuation |
| A mock reset is not scoped to its device identity | Another test loses its session or generated data | Own reset state by the MAC and device identity that created it |
Key files
| File | Why to read it |
|---|---|
| libs/…/portal-catalog-facade.ts | Defines the shared catalog contract and provider capability boundary |
| libs/…/unified-live-tab.component.ts | Shows the common live collection flow for channels, guide data, archive, radio, and history |
| libs/…/xtream-api.service.ts | Defines the Xtream account, catalog, detail, guide, and response boundary |
| libs/…/xtream-data-source.interface.ts | Shows the shared Xtream data-source contract across runtime paths |
| libs/…/with-content.feature.ts | Shows cache hydration, import, cancellation, lock handling, and restoration gates |
| libs/…/category-management-dialog.component.html | Shows the separate category visibility and parental-lock controls |
| libs/…/xtream-full-epg.service.ts | Shows full-guide source selection and provider/XMLTV coordination |
| libs/…/epg-queue.service.ts | Shows account-scoped, mapping-aware, provider-clock-aware live guide previews |
| libs/…/live-stream-layout.component.html | Shows live navigation levels, channel controls, guide, and player surfaces |
| libs/…/live-stream-layout.component.ts | Shows Xtream live browsing, guide, archive, recording, handoff, and playback |
| libs/…/serial-details-playback.service.ts | Shows series episode playback, resume, external launches, and navigation ownership |
| libs/…/vod-details-downloads.service.ts | Shows VOD download identity, metadata snapshots, progress, and cancellation |
| libs/…/stalker-portal-discovery.service.ts | Explains response-based endpoint discovery and authentication classification |
| libs/…/with-stalker-portal.feature.ts | Shows active playlist ownership, repaired portal activation, category visibility, and desktop sync |
| libs/…/stalker-itv-cache.service.ts | Shows full ITV caching, fallback paging, refresh, and portal-scoped readiness |
| libs/…/stalker-paged-client.ts | Defines the boundary between provider page sizes and client paging |
| libs/…/stalker-search.component.ts | Shows search filters, inline details, lock handling, scroll restoration, and playback ownership |
| libs/…/stalker-second-stream.service.ts | Shows combined VOD and series browsing, season forms, and command resolution |
| libs/…/with-stalker-series.feature.ts | Shows paged season and episode access with strict empty-response handling |
| libs/…/with-stalker-epg.feature.ts | Shows bulk and short guide reads with XMLTV mapping ownership |
| libs/…/stalker-player-request.utils.ts | Shows static-link, session-warm, repair, and dynamic-link playback choices |
| libs/…/stalker-collection-metadata.service.ts | Shows safe background hydration of sparse favorites and recent items |
| libs/…/stalker-favorite-playback.service.ts | Shows identity matching and safe command recovery for saved items |
| libs/…/stalker-series-view.component.ts | Shows series detail, lazy seasons, resume, quick start, playback, and downloads |
| libs/…/stalker-series-view.component.html | Shows the shared series detail surface for all Stalker series forms |
| libs/…/stalker-vod-season-episode-loader.ts | Shows single-flight lazy season loading and saved-progress hydration |
| libs/…/stalker-vod-playback-controller.ts | Shows VOD playback ownership, resume loading, and stale-result protection |
| apps/…/README.md | Describes Xtream mock credentials and stable provider scenarios |
| apps/…/README.md | Describes Stalker endpoint modes, device scenarios, and test data |