Electron desktop runtime
The Electron desktop runtime turns the shared IPTVnator client into an installable desktop application. It owns the window, local data, operating-system actions, provider network access, background work, native playback, local downloads, source checks, and app updates while keeping product features in the shared client layer. It is one of the client application runtimes, alongside the browser client and its browser backend.
Runtime role
The Electron runtime is the local boundary between the Angular renderer and desktop resources. It gives shared features a controlled way to use files, SQLite, external players, embedded playback, updates, downloads, source probes, and window controls without giving page code direct Node.js access.
Desktop host boundary
The desktop host creates and manages the main window. It loads the local development client during development and the packaged client after release. It also limits navigation to the expected renderer and sends approved HTTP or HTTPS links to the system browser. A packaged renderer reload can restore the current in-app route instead of leaving the window on a Chromium file-not-found page. apps/…/app.ts• L31-127, apps/…/app.ts• L356-383, apps/…/app.ts• L560-587
The host keeps the renderer in a browser-like security model. Context isolation and disabled Node integration remain enabled. A narrow preload bridge exposes only the desktop actions that the shared client needs. The optional frame-copy playback path can relax the renderer sandbox only when its native runtime is usable. apps/…/app.ts• L107-127, apps/…/main.preload.ts• L270-395
Packaged loads clear Electron service-worker and Cache Storage data before the renderer starts. Development loads keep their normal development path, so this cleanup does not affect the local renderer workflow. apps/…/app.ts• L144-161, apps/…/app.ts• L668-683
References: apps/…/app.ts• L31-127 apps/…/app.ts• L144-161 apps/…/app.ts• L356-383 apps/…/app.ts• L560-587 apps/…/app.ts• L668-683 apps/…/main.preload.ts• L270-395
Renderer bridge
The renderer bridge is the typed contract between shared application features and the Electron main process. It carries requests and events for provider access, source health, playlist files, database work, downloads, playback, EPG data, updates, window state, and zoom. Desktop downloads include normal content and completed archive programmes from catch-up sources. libs/…/electron-api.interface.ts• L603-727, libs/…/electron-api.interface.ts• L778-838, apps/…/main.preload.ts• L401-471, apps/…/main.preload.ts• L718-751, apps/…/main.preload.ts• L1103-1165
The preload layer maps each bridge method to an IPC request or subscription. The main process registers the matching handlers before it loads the renderer. This ordering means the first page actions can use the bridge without racing host setup. apps/…/main.preload.ts• L394-470, apps/…/main.ts• L162-198
The preload also has a narrow local role for renderer concerns. It applies the saved zoom to the current frame and exposes only the shared zoom actions. Optional tracing wraps calls without changing the public bridge shape. apps/…/main.preload.ts• L139-280, apps/…/main.preload.ts• L431-438, apps/…/main.preload.ts• L1168-1186
References: libs/…/electron-api.interface.ts• L603-727 libs/…/electron-api.interface.ts• L778-838 apps/…/main.preload.ts• L139-280 apps/…/main.preload.ts• L394-470 apps/…/main.preload.ts• L1168-1186 apps/…/main.ts• L162-198
Application lifecycle
The Electron lifecycle prepares the desktop environment before the shared client uses it and tears down long-lived resources only after the application really quits. The main process is the coordinator for startup, window recovery, background services, and final cleanup. It also sets network defaults and platform display rules before the first provider or update request.
Startup sequence
Startup selects the desktop profile before eager services read persistence settings. It accepts operating-system launch events early, applies network and display defaults, claims the user-data profile, creates the window, registers bridge handlers, loads the renderer, and then completes local database recovery. It also registers source probes and starts the app update check for packaged builds. apps/…/main.ts• L1-3, apps/…/main.ts• L55-100, apps/…/main.ts• L145-205, apps/…/main.ts• L211-234
The runtime decides the optional frame-copy playback mode before the window exists because that choice affects the window security settings. On Linux it selects X11 when no display choice exists because native embedded playback needs an X11-compatible path. It defers shell PATH loading until the window and bridge are ready, so finding external players does not delay the first usable client. apps/…/main.ts• L71-114, apps/…/main.ts• L227-234
Database access is lazy through a shared initialization promise, so slow SQLite setup does not prevent the first window from appearing. After the database is ready, stale downloads and recordings are recovered. The recovery pass also repairs recordings left in progress by a crash or hard kill. apps/…/main.ts• L193-221
The diagram shows how a desktop launch becomes a ready shared client.
flowchart TD
L[Desktop launch] --> P[Set profile and platform defaults]
P --> S[Claim single-instance profile]
S --> W[Create main window]
W --> I[Register IPC handlers]
I --> R[Load shared renderer]
R --> D[Initialize database and recover downloads and recordings]
D --> A[Ready desktop application]
References: apps/…/main.ts• L1-3 apps/…/main.ts• L55-114 apps/…/main.ts• L145-234 apps/…/main.ts• L257-288
Window lifecycle
The runtime treats the main window as a resource that can be destroyed and created again while the Electron process remains alive. This is important on macOS, where closing the last window does not normally end the process. Window-dependent broadcasters are rebound whenever a new window appears. apps/…/app.ts• L262-345, apps/…/app.ts• L453-530, apps/…/main.ts• L189-193
The host saves normal window bounds and restores them on the next launch. Windows and Linux use renderer-drawn controls over a hidden title bar. macOS keeps the native traffic lights. The same window state contract lets shared UI respond to maximize and full-screen changes. Startup mode can also request a windowed, maximized, or full-screen first presentation without corrupting the saved normal bounds. apps/…/app.ts• L369-451, apps/…/app.ts• L453-558, apps/…/window.events.ts• L41-107
The host also persists one app-wide zoom level across routes and reloads. The preload reads the saved level before the first page paint, applies it after the document is parsed, and tells the main process when it owns the live value. The main process saves that value before a cross-document navigation or close, so Chromium's per-URL defaults do not replace the user's setting. apps/…/preload-zoom-level.ts• L1-20, apps/…/preload-zoom-level.ts• L41-94, apps/…/window-zoom-level.ts• L22-80, apps/…/window.events.ts• L108-120
References: apps/…/app.ts• L262-345 apps/…/app.ts• L369-451 apps/…/app.ts• L453-603 apps/…/main.ts• L181-193 apps/…/window.events.ts• L41-120 apps/…/preload-zoom-level.ts• L41-94 apps/…/window-zoom-level.ts• L22-80
Renderer reload recovery
Packaged Angular routes use file:// paths that do not map to real files. A reload of a route can therefore produce a Chromium error page even though the application index exists. The reload fallback identifies only a failed main-frame route under the renderer root, waits until the error document is ready, and loads the index with the route as a restore value. Development URLs and a failed index are not rewritten. apps/…/renderer-reload-fallback.ts• L29-35, apps/…/renderer-reload-fallback.ts• L75-135, apps/…/renderer-reload-fallback.ts• L137-215
The window navigation guard uses the same route check for renderer-triggered reloads. This gives the two reload paths one result: Angular starts again on the route that the user had open. apps/…/app.ts• L356-383, apps/…/app.ts• L577-587
References: apps/…/renderer-reload-fallback.ts• L29-35 apps/…/renderer-reload-fallback.ts• L75-215 apps/…/app.ts• L356-383 apps/…/app.ts• L577-587
Shutdown sequence
The runtime waits for the final allowed quit before it stops playback sessions and the database worker. This avoids destroying resources when a close guard has asked Electron to keep the window open. The same shutdown path releases embedded playback sessions and external player work. apps/…/main.ts• L298-309
The single-instance guard protects the Chromium profile used by the desktop client. A second launch focuses the existing window and forwards any playlist paths instead of creating a second process that could lose settings writes. apps/…/single-instance.ts• L1-15, apps/…/single-instance.ts• L97-134, apps/…/main.ts• L249-285
References: apps/…/main.ts• L249-309 apps/…/single-instance.ts• L1-15 apps/…/single-instance.ts• L97-134
Native desktop integration
Native integration gives the desktop client capabilities that a normal browser cannot provide. The runtime keeps these capabilities behind feature checks and session contracts so the shared UI can handle unavailable platform support without assuming that every desktop has the same native resources.
Embedded playback
Embedded MPV is the desktop playback path that places video inside the application window. The runtime reports support and capabilities before the shared player creates a session. It then accepts playback, bounds, pause, seek, volume, track, recording, and disposal actions and sends session state back to the renderer. apps/…/embedded-mpv.events.ts• L40-61, apps/…/embedded-mpv.events.ts• L63-152, libs/…/electron-api.interface.ts• L1092-1153
Session updates describe the player state that the shared UI needs, including stream status, tracks, stream statistics, recording state, and reconnect state. Relative seek actions use the playback engine's current position, which keeps rapid seek commands from depending on an older renderer snapshot. apps/…/embedded-mpv-native.service.ts• L694-723, apps/…/embedded-mpv-native.service.ts• L1202-1347, apps/…/main.preload.ts• L542-651
Automatic reconnect is a main-process policy for a stream that already played and then lost its connection. It reports the pending attempt to the renderer while it uses capped backoff of 2, 4, 8, 16, 30, and 30 seconds for up to six attempts. A live stream reloads at the live edge. A video-on-demand stream reloads from its last known position, but an end-of-file near the known duration remains a normal end. Stable playback resets the outage budget. A user load, pause, or session close cancels the policy. Engine failures and sessions that no longer exist remain terminal because reloading media cannot repair the playback engine. apps/…/embedded-mpv-reconnect.ts• L9-64, apps/…/embedded-mpv-reconnect.ts• L183-228, apps/…/embedded-mpv-reconnect.ts• L274-390
The runtime supports two desktop rendering modes. The native mode embeds an MPV view through a platform window handle. The frame-copy mode renders through a helper process and a renderer canvas. The second mode is opt-in and is selected before window creation only when its platform, helper, and runtime checks pass. If the optional runtime is missing, the native path or another playback choice remains available. apps/…/embedded-mpv-native.service.ts• L230-281, apps/…/embedded-mpv-native.service.ts• L350-527, apps/…/main.ts• L86-100
Embedded sessions report state from the playback engine rather than from renderer commands alone. The service polls active sessions, can reconnect a dropped live stream, and disposes sessions when the renderer reloads or its process ends. Automatic recovery can restore an external subtitle and restart an interrupted recording when the stream plays again. This keeps native handles, helper processes, and recording state tied to a live page. apps/…/embedded-mpv-native.service.ts• L1049-1133, apps/…/embedded-mpv-native.service.ts• L1147-1347
References: apps/…/embedded-mpv.events.ts• L40-152 apps/…/embedded-mpv-native.service.ts• L189-239 apps/…/embedded-mpv-native.service.ts• L230-281 apps/…/embedded-mpv-native.service.ts• L350-527 apps/…/embedded-mpv-native.service.ts• L694-723 apps/…/embedded-mpv-native.service.ts• L1049-1133 apps/…/embedded-mpv-native.service.ts• L1147-1347 apps/…/embedded-mpv-reconnect.ts• L148-450
Recording lifecycle
Embedded playback can record the active stream to a local transport-stream file. The desktop service reserves a unique target path and sends start and stop requests to MPV. A recording tracker then persists the row and its channel or programme context in SQLite. apps/…/embedded-mpv-native.service.ts• L859-920, apps/…/embedded-mpv-recording-tracker.ts• L120-177, apps/…/schema.ts• L6-42
Recording state follows observed MPV session snapshots rather than treating a stop request as proof that the file is complete. The tracker waits for a settled inactive state, checks the file, and marks it completed, interrupted, or failed. If a live stream drops during recording, an actual automatic reload finalizes the old partial file as interrupted. A later successful reload starts a new file with the same recording context. If the stream recovers before the reload, the existing recording remains active. apps/…/embedded-mpv-recording-tracker.ts• L179-367, apps/…/embedded-mpv-native.service.ts• L182-217, apps/…/embedded-mpv-native.service.ts• L923-945, apps/…/embedded-mpv-native.service.ts• L983-1005
The tracker also accepts programme data after the recording stops and sends a separate update signal so the shared client can refresh its list without refreshing downloads. apps/…/recordings.events.ts• L284-346, apps/…/recording-broadcast.ts• L3-18
The recording flow connects the player session to durable local data and later recovery.
flowchart LR
A[Start recording] --> B[Reserve file path]
B --> C[Persist recording row]
C --> D[Observe MPV snapshots]
D --> E[Finalize file and status]
E --> F[Notify renderer]
G[App starts after interruption] --> H[Probe owner and file]
H --> I[Repair stale row]
I --> F
References: apps/…/embedded-mpv-native.service.ts• L859-920 apps/…/embedded-mpv-recording-tracker.ts• L179-367 apps/…/recordings.events.ts• L145-387 apps/…/recording-recovery.ts• L193-319
External player integration
External player integration starts MPV or VLC as a separate process when the user chooses it. The main process carries the stream request and playback context, tracks the session, reports progress and errors, and stores the selected player paths. The shared client sees a session interface rather than a child-process implementation. apps/…/player.events.ts• L43-136, apps/…/external-player-runtime.ts• L24-109
The launch path is platform-aware. It can use a configured executable, a known system path, or a host launch path when the Electron package is sandboxed. The runtime also loads the user's interactive shell path after startup on supported systems. Failures become renderer events with user-facing guidance instead of unhandled process errors. apps/…/external-player-runtime.ts• L37-90, apps/…/main.ts• L102-128, apps/…/main.ts• L227-234
References: apps/…/player.events.ts• L43-136 apps/…/external-player-runtime.ts• L24-109 apps/…/main.ts• L102-128 apps/…/main.ts• L227-234
Platform behavior
The runtime adapts desktop behavior to the operating system while keeping the bridge stable. macOS delivers Finder file opens through open-file. Windows and Linux deliver file associations through process arguments. Linux packaged launchers and direct binary launches request X11 when no explicit display choice exists because native embedded MPV does not support native Wayland embedding. apps/…/main.ts• L63-84, apps/…/main.ts• L238-255, electron-builder.json• L80-117
The frame-copy engine has a narrower platform promise than the general desktop host. Its runtime gate checks the operating system, CPU architecture, helper files, and on Linux the graphics/runtime profile before it activates the frame-transfer path and its special preload requirements. apps/…/embedded-mpv-frame-copy-platform.util.ts• L11-29, apps/…/embedded-mpv-frame-copy-platform.util.ts• L90-199, apps/…/embedded-mpv-native.service.ts• L378-453
References: apps/…/main.ts• L63-84 apps/…/main.ts• L238-255 electron-builder.json• L80-117 apps/…/embedded-mpv-frame-copy-platform.util.ts• L11-29 apps/…/embedded-mpv-frame-copy-platform.util.ts• L90-199
Application updates
Application updates let a packaged desktop build check its configured release channel, show release information, download a supported update, and install it through the host. Self-update is available on macOS, Windows, and Linux AppImage builds. Other packaged Linux formats receive a manual release-page result instead of a false self-update promise. apps/…/app-update.service.ts• L108-122, apps/…/app-update.service.ts• L184-232, apps/…/main.preload.ts• L412-430
The runtime keeps checking, download progress, completion, and errors in one status sent to the renderer. Release notes use the release's own channel, while a channel change refreshes an idle check and does not discard an update that is already downloading or ready to install. A release catalog loads notes by channel and supports previous and next navigation without mixing stable and nightly releases. Installation temporarily permits the updater's close path so a window close guard cannot strand the update. apps/…/app-update.service.ts• L243-363, apps/…/app-update.service.ts• L365-469, apps/…/app-update-release-notes.ts• L32-157, apps/…/main.ts• L145-165
References: apps/…/app-update.service.ts• L108-122 apps/…/app-update.service.ts• L184-232 apps/…/app-update.service.ts• L243-363 apps/…/app-update.service.ts• L365-469 apps/…/app-update-release-notes.ts• L32-157 apps/…/main.preload.ts• L412-430 apps/…/main.ts• L145-165
Desktop file workflows
File workflows let the operating system open M3U and M3U8 playlists in the running application. The main process normalizes launch requests into a queue. The renderer subscribes, announces readiness, and acknowledges each request so a reload or renderer failure does not silently lose a file. macOS requests are captured through open-file; Windows and Linux requests are taken from the original launch or second-instance arguments. apps/…/main.ts• L238-285, apps/…/playlist-open.events.ts• L1-49, libs/…/electron-api.interface.ts• L218-228
The same boundary handles save dialogs, file writes, file paths, downloads, and update installation. These actions remain host-owned because they need operating-system permissions or local paths. apps/…/main.preload.ts• L449-490, apps/…/main.preload.ts• L1027-1068
References: apps/…/main.ts• L238-285 apps/…/playlist-open.events.ts• L1-49 libs/…/electron-api.interface.ts• L218-228 apps/…/main.preload.ts• L449-490
Download lifecycle
The desktop download manager turns a shared download request into a durable local file. It validates the source and target folder, stores the download row, runs one queued transfer at a time, and reports state changes through the bridge. The host checks that reveal and play actions refer to a managed file that still exists. apps/…/downloads.events.ts• L33-89, apps/…/downloads.events.ts• L91-264, apps/…/download-runtime.ts• L35-52, apps/…/download-runtime.ts• L188-320
Catch-up downloads are a separate archive path for completed programmes. The request must contain a finished programme interval that has not expired, and its source must be an HTTP or HTTPS transport stream rather than an M3U8 playlist. This keeps an archive download distinct from live playback and lets restart and recovery use the stored programme identity. apps/…/download-catchup.ts• L3-49, apps/…/download-requests.ts• L30-137
Download state survives an application restart. The startup recovery pass can complete a file whose final write finished before the database update, pause a usable partial file, or mark an unsafe or unusable transfer as failed. apps/…/download-recovery.ts• L67-94, apps/…/download-recovery.ts• L147-317
The download flow links the renderer request to validation, queued transfer, durable state, and restart recovery.
flowchart LR
A[Renderer download request] --> B[Validate source and folder]
B --> C[Create or reset database row]
C --> D[Queue transfer]
D --> E[Write local partial file]
E --> F[Finalize and publish update]
G[Application restart] --> H[Inspect row and file]
H --> I[Resume as paused, complete, or fail]
References: apps/…/downloads.events.ts• L33-89 apps/…/download-catchup.ts• L3-49 apps/…/download-requests.ts• L30-259 apps/…/download-runtime.ts• L188-320 apps/…/download-recovery.ts• L147-317
Worker model
Workers move large or blocking tasks away from the Electron main process. They protect window responsiveness while handling database work, playlist refresh, and EPG fetch and parse work. The main process remains responsible for worker lifetime, request correlation, progress, cancellation, and error delivery.
Background processing
The database worker owns the SQLite connection used for application data. Requests return results through a message channel and can emit progress or cancellation states for long operations such as content import, playlist deletion, and recording queries or updates. Cancellable work registers its operation state before database setup and checks that state between batches, while progress events are throttled without hiding terminal results. The worker also carries favorite reads, backup and restore actions, removal, and ordering through the same database boundary. The worker closes its database when its thread exits. apps/…/database-worker-client.ts• L42-83, apps/…/database.worker.ts• L221-357, apps/…/database.worker.ts• L764-766, apps/…/database.worker.ts• L1012-1117, apps/…/database.worker-connection.ts• L62-109, apps/…/recordings.events.ts• L145-387
The playlist refresh worker fetches or reads a source, parses it, and returns a normalized playlist. It reports fetch and parse phases, checks cancellation between stages, aborts active network work, and returns a terminal event for success, cancellation, or error. apps/…/playlist-refresh.worker.ts• L33-100, apps/…/playlist-refresh.worker.ts• L103-205, apps/…/playlist-refresh.worker.ts• L208-263
The EPG path streams remote or approved local guide data into the local database and reports channel and programme progress. The host keeps old rows until valid data arrives and treats an empty result as a failed fetch. This prevents a bad guide feed from silently deleting useful guide data. apps/…/epg-parser.worker.ts• L52-84, apps/…/epg-parser.worker.ts• L92-203, apps/…/epg-parser.worker.ts• L206-236
EPG imports use one writer slot across normal batches, forced refreshes, and separate IPC requests. Requests for the same source share the active operation. Different sources wait until the prior worker has fully stopped, which protects SQLite from overlapping writers. A source clear or global clear retires queued and active work, waits for shutdown, and then clears data in a worker before a replacement import can start. apps/…/epg-fetch-queue.ts• L1-18, apps/…/epg-worker.service.ts• L92-145, apps/…/epg-worker.service.ts• L216-359, apps/…/epg-source-generation.ts• L1-30
Freshness checks skip stored source data that is less than 12 hours old unless the user forces a refresh. A failed or cancelled fetch does not leave a success marker behind. Worker construction, errors, unexpected exits, and timeouts become source-level error updates, while retired work becomes a cancelled update. apps/…/epg-fetch.service.ts• L17-90, apps/…/epg-fetch.service.ts• L98-191, apps/…/epg-fetch-operation.ts• L29-57, apps/…/epg-fetch-operation.ts• L132-287
Local guide files stay behind a host authorization gate. The renderer cannot enable local-file access by sending a flag; only an approved file path causes the host to add that permission for the worker. A pending approval remains outside the database writer queue, so clear operations can finish without waiting for a dialog, and a late approval is retired safely. apps/…/epg.events.ts• L138-153, apps/…/epg-worker.service.ts• L148-213
References: apps/…/database-worker-client.ts• L42-83 apps/…/database.worker.ts• L221-357 apps/…/database.worker.ts• L764-766 apps/…/database.worker.ts• L1012-1117 apps/…/database.worker.ts• L1240-1332 apps/…/database-worker-connection.ts• L62-109 apps/…/playlist-refresh.worker.ts• L33-100 apps/…/playlist-refresh.worker.ts• L103-263 apps/…/epg-parser.worker.ts• L52-236 apps/…/epg-fetch-operation.ts• L29-287 apps/…/epg-fetch-queue.ts• L1-18 apps/…/epg-fetch.service.ts• L17-191 apps/…/epg-source-generation.ts• L1-30 apps/…/epg-worker-runtime.ts• L13-187 apps/…/epg-worker.service.ts• L32-359 apps/…/recordings.events.ts• L145-387
Worker delivery
Worker entry points are built as separate Node targets because Electron starts them as worker threads rather than as part of the main bundle. Development workers load from the local build directory. Packaged workers load from the application resources and receive native module search paths when needed. apps/…/build-worker.js• L28-107, apps/…/worker-runtime-paths.ts• L121-186
The package layout treats worker files and native database modules as required runtime inputs. A missing worker or unpacked native dependency can pass source compilation but fail only after the installed app starts, so package checks verify these files before delivery. tools/…/verify-electron-package-layout.mjs• L697-731
References: apps/…/build-worker.js• L28-107 apps/…/worker-runtime-paths.ts• L121-186 tools/…/verify-electron-package-layout.mjs• L697-731
Shared feature boundary
The Electron backend supplies runtime services rather than owning the user-facing product model. Shared Angular features ask for data and actions through service contracts. The Electron service translates those requests to the bridge, while the browser service uses browser storage or the browser backend for the same product flows.
Shared client contract
The shared client selects ElectronService when the Electron bridge exists. That service forwards provider requests, playlist imports, playback actions, automatic refresh, downloads, and host checks to the desktop API. Shared portal and workspace code can therefore use one request model across desktop and browser runtimes. apps/…/app.config.ts• L92-100, apps/…/electron.service.ts• L53-79, apps/…/electron.service.ts• L133-249
The Electron API is intentionally wider than a browser API because the desktop host can provide local database operations, downloads, native players, window controls, updates, and recordings. These are runtime capabilities, not separate versions of the shared workspace. libs/…/electron-api.interface.ts• L603-727, libs/…/electron-api.interface.ts• L813-887, libs/…/electron-api.interface.ts• L1155-1188
References: apps/…/app.config.ts• L92-100 apps/…/electron.service.ts• L53-79 apps/…/electron.service.ts• L133-249 apps/…/main.preload.ts• L401-430 apps/…/main.preload.ts• L718-751 libs/…/electron-api.interface.ts• L603-727
Provider and persistence paths
Desktop provider requests use the main process as their network boundary. Xtream and Stalker handlers validate and follow remote requests, apply host connectivity tracking, support cancellation, and return structured results to the renderer. Stalker discovery can inspect candidate paths without tripping the normal host failure guard, while ordinary requests stop adding load after a host has failed repeatedly. apps/…/xtream.events.ts• L63-167, apps/…/xtream.events.ts• L201-326, apps/…/stalker.events.ts• L54-145, apps/…/stalker.events.ts• L207-291
The handlers also preserve useful error meaning across IPC. HTTP responses remain distinguishable from connection failures, Stalker authentication failures become structured markers, and sensitive request data is redacted from logs. This lets shared provider flows choose the next action without receiving raw host or credential details. apps/…/stalker.events.ts• L147-206, apps/…/stalker.events.ts• L254-287, apps/…/xtream.events.ts• L238-306
Playlist and EPG work use the same host-side safety rules before data reaches the shared state or local database. apps/…/playlist-source.ts• L85-155, apps/…/playlist-refresh.worker.ts• L103-155, apps/…/epg-parser.worker.ts• L206-236
M3U source health checks also stay in the host. A probe reads only a bounded source prefix, tries a range request before a full request when needed, follows validated redirects, and returns an explicit health result for active, unavailable, invalid, timed-out, or cancelled sources. This lets the shared client test a source without moving network and cancellation control into page code. apps/…/m3u-source-probe.ts• L13-101, apps/…/m3u-source-probe.ts• L103-107, apps/…/main.ts• L170-184
EPG bridge handlers coordinate source reconciliation, freshness checks, imports, clears, and guide queries with the EPG worker and query services. Local file selection is authorized and remembered by the host. Channel mappings are resolved before guide queries so the renderer keeps its playlist channel keys even when guide data uses a different channel identity. apps/…/epg.events.ts• L41-180, apps/…/epg.events.ts• L183-245, apps/…/epg.events.ts• L302-377
Desktop persistence differs from browser persistence but serves the same product needs. The Electron path stores application data in local SQLite and exposes searches, favorites, recent items, playback positions, metadata, playlist state, downloads, and recordings through the bridge. The shared client consumes those results without taking ownership of the database connection. apps/…/database.worker.ts• L384-487, apps/…/database.worker.ts• L1019-1183, apps/…/recordings.events.ts• L145-387, libs/…/electron-api.interface.ts• L813-1015
Playlist persistence also protects provider-specific state across competing writes. A learned Xtream server timezone stays with the same server during a full playlist upsert, is removed when the playlist moves to another server, and is written only when the stored row still matches the connection that produced it. Optional fields that a newer playlist clears do not reappear from stale SQLite columns. apps/…/playlist.operations.ts• L131-209, apps/…/playlist.operations.ts• L358-395, apps/…/playlist-server-timezone.operations.ts• L1-90
The runtime also migrates older playlist data into the SQLite-backed product store. The migration treats the import and its completion receipt as one unit, keeps existing authoritative catalog data, and reports a safe error without exposing provider credentials when the old data is invalid. apps/…/playlist-migration.operations.ts• L6-75
The browser runtime reaches a browser backend for server-side provider work instead. A feature that uses the injected data service can remain shared. A feature that directly calls Electron APIs becomes desktop-only and needs a browser capability decision. apps/…/pwa.service.ts• L76-166, apps/…/electron.service.ts• L133-249
References: apps/…/xtream.events.ts• L63-167 apps/…/xtream.events.ts• L201-326 apps/…/stalker.events.ts• L54-145 apps/…/stalker.events.ts• L207-291 apps/…/playlist-source.ts• L85-155 apps/…/m3u-source-probe.ts• L13-107 apps/…/epg.events.ts• L41-245 apps/…/epg.events.ts• L302-377 apps/…/epg-parser.worker.ts• L206-236 apps/…/database.worker.ts• L384-487 apps/…/database.worker.ts• L1019-1183 apps/…/recordings.events.ts• L145-387 apps/…/playlist.operations.ts• L131-209 apps/…/playlist.operations.ts• L358-395 apps/…/playlist-server-timezone.operations.ts• L1-90 apps/…/playlist-migration.operations.ts• L6-75 apps/…/downloads.events.ts• L91-264 apps/…/pwa.service.ts• L76-166
Favorite catalog continuity
Favorite catalog continuity keeps an Xtream favorite as user data even when a provider refresh removes or changes its matching catalog row. The database worker exposes favorite reads, backup and restore actions, removal, and ordering through the desktop boundary. Catalog queries then combine the saved favorite with a compatible content row when one exists. apps/…/favorite-catalog.ts• L7-25, apps/…/favorite-queries.ts• L12-85, apps/…/database.worker.ts• L1057-1117
The shared result distinguishes three catalog states:
presentmeans a compatible catalog item is available.missingmeans a completed import has no compatible item.unknownmeans the import is still running or did not complete safely.
This lets the client keep an unavailable favorite visible and removable without treating it as playable content. A saved title and artwork snapshot remains available while the catalog is missing or identity evidence conflicts. apps/…/favorite-catalog.ts• L28-55, apps/…/favorite-queries.ts• L12-53
Identity evidence controls when the runtime may reconnect a favorite to refreshed content. A provider ID and type identify the candidate, while matching metadata confirms that the candidate is the same item. Conflicting metadata keeps the saved favorite separate instead of adopting a wrong duplicate. When a completed import returns compatible content, the database worker reconciles the link and updates the saved snapshot without replacing known values with empty catalog fields. apps/…/favorite-catalog.ts• L34-43, apps/…/favorite-catalog.ts• L88-133, apps/…/content-metadata.operations.ts• L114-127, apps/…/playlist.operations.ts• L598-618
The favorite flow separates durable user intent from temporary provider catalog state.
flowchart LR
F[Saved favorite identity and snapshot] --> R[Provider catalog refresh]
R --> U[Unknown while import runs]
U --> C{Import completed}
C -->|Compatible content| P[Relink and refresh snapshot]
C -->|No compatible content| M[Keep favorite as missing]
C -->|Conflict| X[Keep snapshot and flag identity conflict]
References: apps/…/favorite-catalog.ts• L7-25 apps/…/favorite-catalog.ts• L28-55 apps/…/favorite-catalog.ts• L88-180 apps/…/favorite-queries.ts• L12-85 apps/…/content-metadata.operations.ts• L114-127 apps/…/playlist.operations.ts• L598-618 apps/…/database.worker.ts• L1057-1117
Build and package model
The desktop build assembles the shared web client, Electron main process, worker entry points, native playback output, and packaged resources into one application. Build targets prepare each class of runtime input before Electron Builder creates platform packages.
Build assembly
The Electron build depends on the web client, worker build, and embedded MPV native build. The development serve target waits for the web client and starts Electron with a remote debugging port. Package and make targets then use the built application as their source. apps/…/project.json• L7-20, apps/…/project.json• L32-78, apps/…/project.json• L173-216
The native build is optional for ordinary desktop operation but becomes part of the package when a supported embedded runtime is available. The build records an unavailable marker when it cannot produce the optional player, which lets the runtime report an honest capability instead of loading stale native files. apps/…/build-embedded-mpv.js• L82-107, apps/…/build-embedded-mpv.js• L735-769
References: apps/…/project.json• L7-20 apps/…/project.json• L32-78 apps/…/project.json• L173-216 apps/…/build-embedded-mpv.js• L735-769
Package runtime contract
Electron Builder packages the renderer and backend inside the application archive while unpacking native modules and native playback files that must be loaded by the operating system. Workers are added as extra resources. The package also registers M3U and M3U8 file associations and selects platform-specific installers or archives. electron-builder.json• L5-59, electron-builder.json• L60-117
After packaging, validation checks the worker files, unpacked SQLite module, dependency closure, native playback layout, Linux launcher, and platform rules. This protects the boundary between a build that compiles and an installed desktop app that can start and use its runtime resources. tools/…/electron-after-pack.cjs• L189-265, tools/…/verify-electron-package-layout.mjs• L697-811
References: electron-builder.json• L5-59 electron-builder.json• L60-117 tools/…/electron-after-pack.cjs• L189-265 tools/…/verify-electron-package-layout.mjs• L697-811
Change checklist
When these files or sections are changed, remember to consider these:
- When a desktop capability changes, update the shared Electron API type, preload method, main-process handler, and
ElectronServicecall as one contract. - When packaged renderer storage behavior changes, keep service-worker and Cache Storage cleanup before packaged loading and keep development loading separate.
- When a source probe changes, keep its IPC name, payload, cancellation owner, bounded-read result, and renderer health states aligned.
- When provider request handling changes, preserve URL safety, redirect checks, host connectivity state, timeout behavior, cancellation, and the structured error meaning expected by discovery.
- When app update behavior changes, keep the channel, status, release-note catalog, updater support rules, preload methods, and close-guard handoff aligned.
- When release-note paging changes, keep the release version's channel separate from the configured channel and keep catalog invalidation aligned with new release checks.
- When a recording status or metadata field changes, update the shared recording type, database schema, tracker finalization, list decoration, programme enrichment, and recovery rules together.
- When a recording event is renamed, update the main-process broadcast and renderer subscription. Keep it separate from download updates so recording changes do not trigger unrelated file probes.
- When startup order changes, keep IPC registration before renderer load and keep database recovery after the renderer can show a window. Keep stale-recording recovery aware of recordings started during the same bootstrap.
- When profile selection or playlist migration changes, preserve the early profile bootstrap and the atomic migration receipt. Keep retries from replaying a completed import and keep old authoritative catalog data intact.
- When playlist upsert or update behavior changes, keep the learned server timezone tied to its connection, invalidate it when the server changes, and make full upserts clear fields that the new payload no longer contains.
- When favorite catalog behavior changes, keep the worker actions, saved snapshot, identity conflict rules, catalog status, import-completion reconciliation, and backup or restore payloads aligned.
- When a worker entry point or message shape changes, update its build output, runtime path resolution, package check, and main-process client together.
- When worker cancellation or progress events change, preserve operation registration before database setup, cancellation receipts, throttled progress, and terminal event delivery.
- When EPG import changes, keep source rows until valid data arrives and keep empty-feed errors distinct from successful freshness updates. Preserve one writer slot across all IPC entry points, same-source in-flight sharing, full worker shutdown before the next writer, source-generation cancellation, and the local-file authorization gate.
- When native playback output changes, keep the platform gate, sandbox decision, runtime marker, package layout, and capability report aligned.
- When reconnect behavior changes, keep stream-loss classification, live versus VOD resume rules, attempt budget, user cancellation, recording interruption, subtitle restoration, session updates, and renderer disposal consistent across native and frame-copy engines.
- When Linux display or package rules change, check the direct-launch X11 fallback, packaged launcher arguments, sandbox permissions, graphics mount, and embedded-player support result together.
- When a window can be recreated, rebind every service that sends events to the current window instead of retaining a destroyed window reference.
- When renderer navigation or packaged reload behavior changes, keep the trusted URL rule, route restore query, reload failure timing, and Angular route restore contract aligned.
- When zoom behavior changes, keep the preload handshake, frame-bound zoom, navigation save point, close save point, and window IPC events aligned.
- When catch-up download metadata or source rules change, update the shared type, preload payload, archive validation, transfer path, finalization proof, and restart recovery together.
- When download folder behavior changes, preserve the saved directory authorization and the managed-file check before reveal or play actions.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Renderer loads before IPC handlers are registered | The first playlist, provider, or settings action can call a missing host handler | Register event modules before loadMainWindow. apps/…/main.ts• L170-198 |
| A second process opens the same user-data profile | Renderer settings writes can miss the profile lock and disappear | Select the profile before eager persistence imports and acquire the single-instance lock before bootstrap. apps/…/main.ts• L1-3, apps/…/main.ts• L257-285 |
| Packaged renderer reuses stale service-worker or Cache Storage state | Old app assets or worker state can survive a release load | Clear service-worker and Cache Storage before loadFile; keep the cleanup out of development loads. apps/…/app.ts• L144-161, apps/…/app.ts• L668-683 |
| A worker file is absent from packaged resources | Database, EPG, playlist, or recording work fails only in the installed app | Resolve packaged worker paths and verify required worker artifacts. apps/…/worker-runtime-paths.ts• L148-186, tools/…/verify-electron-package-layout.mjs• L697-721 |
better-sqlite3 is left inside the archive or cannot be found unpacked | The database worker cannot open local application data | Use native module search paths and verify the unpacked dependency. apps/…/worker-runtime-paths.ts• L212-259, tools/…/verify-electron-package-layout.mjs• L703-731 |
| Linux launches native embedded MPV without an explicit usable X11 or XWayland path | Native embedding cannot attach to the desktop window | Apply the direct-launch X11 fallback, request X11 in packaged launchers, and reject unsupported display setups. apps/…/main.ts• L71-84, electron-builder.json• L80-117, apps/…/embedded-mpv-native.service.ts• L378-403 |
| Frame-copy opt-in has no valid helper or reader | The renderer could lose its required sandbox boundary or the player could fail to start | Require platform support and the helper runtime before activating the engine. apps/…/app.ts• L107-127, apps/…/embedded-mpv-frame-copy-platform.util.ts• L90-199 |
| Renderer reloads while native playback is active | MPV sessions or helper processes can remain alive without a controlling page | Dispose sessions on full navigation or renderer process loss. apps/…/embedded-mpv-native.service.ts• L1090-1133 |
| A stream reports an engine failure as a normal playback loss | Reconnect attempts cannot repair the render context and can hide the real terminal error | Keep engine-origin errors terminal and retry only stream losses. apps/…/embedded-mpv-reconnect.ts• L245-247, apps/…/embedded-mpv-reconnect.ts• L298-327 |
| A dropped VOD is treated as a normal end, or every EOF is treated as a drop | Playback can stop mid-programme or skip the rest of a finished programme | Retry only an early EOF with a known duration and accept an EOF near the end or after a reload resumes at the same point. apps/…/embedded-mpv-reconnect.ts• L155-172, apps/…/embedded-mpv-reconnect.ts• L393-442 |
| Reconnect resumes a live stream from an old VOD offset, or retries after a user pause | The stream starts at the wrong place or resumes without user action | Use the live edge for live playback, the last played position for VOD, and cancel on user load or pause. apps/…/embedded-mpv-reconnect.ts• L183-228, apps/…/embedded-mpv-reconnect.ts• L426-442 |
| Renderer reloads on an in-app route without route recovery | Chromium shows a file-not-found page and the user loses the active page | Restore only a failed routed main-frame load and defer the recovery load until the error document is ready. apps/…/renderer-reload-fallback.ts• L126-135, apps/…/renderer-reload-fallback.ts• L167-215 |
| Preload saves zoom before it owns the frame value | Chromium's default or per-URL value can overwrite the saved app zoom | Apply after DOMContentLoaded, acknowledge ownership, and save only owned contents. apps/…/preload-zoom-level.ts• L41-67, apps/…/window-zoom-level.ts• L22-58 |
| A playlist file arrives while the renderer is not ready | The operating-system open request can be lost | Queue the request until the renderer announces and acknowledges delivery. apps/…/playlist-open.events.ts• L1-49 |
| A source probe reads an unbounded response or survives past its owner | A large or stuck provider response can consume resources after the page is gone | Limit the inspected prefix and tie the request to the renderer probe deadline and cancellation control. apps/…/m3u-source-probe.ts• L13-101 |
| Provider discovery counts every candidate failure as a host outage | A valid portal can be blocked before discovery finishes | Exempt candidate discovery from the failure guard while preserving normal request protection. apps/…/stalker.events.ts• L64-73, apps/…/stalker.events.ts• L106-112 |
| Provider errors cross IPC as raw or non-serializable values | Discovery cannot tell an answered HTTP error from a network failure | Convert HTTP and transport errors into parseable errors and classify Stalker auth failures before returning. apps/…/stalker.events.ts• L147-175, apps/…/xtream.events.ts• L281-306 |
| A packaged format has no self-update support | The user can be shown an update action that cannot install the release | Report unsupported self-update and provide the channel's manual release URL. apps/…/app-update.service.ts• L108-122, apps/…/app-update.service.ts• L444-470 |
| An updater error occurs after installation prepares the close path | The next normal window close can bypass the close guard | Revoke the one-shot prepared quit when the install fails. apps/…/app-update.service.ts• L401-413 |
A recording row stays in recording after a crash or hard kill | The shared client can show a recording that cannot be stopped or whose final state is unknown | Check the owner process and file at startup. Mark a proven playable file interrupted, mark an absent or empty file failed, and keep inconclusive probes for a later pass. apps/…/recording-recovery.ts• L193-319 |
| A stop request is treated as the end of a recording before MPV confirms it | The file size or status can describe a still-flushing file | Finalize from settled session snapshots with a bounded fallback. apps/…/embedded-mpv-recording-tracker.ts• L45-86, apps/…/embedded-mpv-recording-tracker.ts• L179-256 |
| A reload replaces a stream while recording but the interruption is not recorded | The old partial file can appear complete and the resumed programme can lose its recording | Finalize the old file only when an actual reload is issued, then start a new file after playback resumes. apps/…/embedded-mpv-native.service.ts• L193-215, apps/…/embedded-mpv-native.service.ts• L983-1005 |
| A catalog refresh deletes or replaces a favorite before compatible content is confirmed | An unavailable favorite can disappear or point to the wrong duplicate | Keep the favorite snapshot separate from the catalog and relink only after completed import and identity checks. apps/…/favorite-catalog.ts• L7-25, apps/…/favorite-catalog.ts• L88-133 |
| A favorite matches a provider ID but conflicts on known identity metadata | The shared client can use artwork or playback data from a different item | Preserve the identity-conflict state and use the saved snapshot until compatible metadata confirms the match. apps/…/favorite-catalog.ts• L136-180, apps/…/favorite-queries.ts• L24-53 |
| A favorite import remains in an unknown state after a failed or cancelled catalog update | The client can claim that a favorite is missing when the catalog result is not final | Treat importing, failed, and cancelled import states as unknown; report missing only after a completed import. apps/…/favorite-catalog.ts• L46-55 |
| An EPG feed returns no channels after old data is cleared | A temporary or bad feed can erase useful guide data and appear fresh | Keep old rows until the first valid batch and treat zero channels as an error. apps/…/epg-parser.worker.ts• L105-119, apps/…/epg-parser.worker.ts• L161-175 |
| Separate EPG requests start overlapping SQLite writers, or a replacement starts before the old worker has stopped | Imports or clears can lock the database, overwrite each other, or leave a queued row without a terminal state | Share same-source in-flight work, serialize all writers, wait for real worker termination, and fence retired requests with source generations. apps/…/epg-fetch-queue.ts• L1-18, apps/…/epg-worker.service.ts• L105-145, apps/…/epg-worker.service.ts• L216-359, apps/…/epg-source-generation.ts• L1-30 |
A local EPG approval arrives after its source was cleared, or a renderer supplies allowLocalFile for a remote source | A retired import can restart or an unapproved local path can reach the worker | Check the source generation after approval and derive local-file access only from the host authorizer. apps/…/epg-worker.service.ts• L171-213 |
| A worker cannot start, exits, or times out without a source-level terminal update | The renderer can leave an EPG row in queued or wait forever | Convert construction and worker lifecycle failures into error progress, and terminate the worker before releasing the operation. apps/…/epg-fetch-operation.ts• L29-57, apps/…/epg-fetch-operation.ts• L132-287 |
| A failed worker termination is ignored before a later fetch or clear | A new writer can overtake a live SQLite holder and corrupt or lock EPG work | Retain failed terminations and make later operations drain the shutdown barrier before creating a writer. apps/…/epg-worker-runtime.ts• L18-43, apps/…/epg-worker.service.ts• L216-240 |
| A catch-up request describes a live, expired, or M3U8 source | The download can save a non-finite or wrong kind of archive stream | Require a completed unexpired programme and an HTTP or HTTPS TS stream before queuing. apps/…/download-catchup.ts• L3-39 |
| A catch-up partial file no longer matches its stored ownership proof | A retry can adopt bytes from an unrelated file or overwrite the wrong archive | Compare the stored file identity and journal before reuse. apps/…/download-recovery.ts• L31-46, apps/…/download-runtime.ts• L243-258 |
| A download file path is not managed by the database or is no longer available | Reveal or play could expose an arbitrary path or return a misleading success | Verify the database owner and current file availability before calling the system shell. apps/…/downloads.events.ts• L73-89, apps/…/downloads.events.ts• L235-259 |
| A playlist migration writes rows but not its completion receipt, or writes the receipt before the rows | A retry can duplicate or skip the legacy import | Commit imported rows and the receipt in one database transaction. apps/…/playlist-migration.operations.ts• L10-68 |
| A learned playlist timezone is written after the playlist moved or a stale full upsert lands | The UI can show the old server's clock or lose a newer playlist payload | Guard the timezone write by the current connection, invalidate it on a server change, and merge clockless upserts atomically. apps/…/playlist-server-timezone.operations.ts• L34-90, apps/…/playlist.operations.ts• L131-209 |
| A full upsert leaves cleared fields in SQLite columns | Reads can resurrect old credentials or source settings that the current playlist removed | Map empty values to cleared columns and keep full and metadata reads consistent. apps/…/playlist.operations.ts• L131-209, apps/…/playlist.operations.ts• L216-255 |
| Recording programme data is accepted without validation | Untrusted renderer data can corrupt stored metadata or grow without bound | Drop invalid entries and bound the number and size of programme fields. apps/…/recording-programs.ts• L5-69 |
Key files
| File | Why to read it |
|---|---|
| apps/…/main.ts | Shows the full Electron startup, profile selection, bridge registration, source probe registration, file-open handling, update startup, database recovery, single-instance flow, deferred player path setup, and shutdown order. |
| apps/…/app.ts | Shows the main window lifecycle, renderer loading rules, packaged storage cleanup, navigation boundary, renderer security settings, reload recovery hookup, zoom persistence hookup, and platform window behavior. |
| apps/…/main.preload.ts | Shows how the typed desktop API reaches the isolated renderer, including source probes, updates, playback, downloads, window controls, and zoom. |
| apps/…/preload-zoom-level.ts | Shows the renderer half of app-wide zoom restore and frame-bound zoom changes. |
| apps/…/window-zoom-level.ts | Shows when the main process takes ownership of the live zoom value and persists it. |
| apps/…/renderer-reload-fallback.ts | Shows how packaged file-based routes survive renderer reloads. |
| libs/…/electron-api.interface.ts | Defines the shared request, response, session, progress, and event contract for desktop features. |
| apps/…/playlist.events.ts | Shows how desktop playlist import and refresh requests enter the host and workers. |
| apps/…/m3u-source-probe.ts | Shows the bounded and cancellable host-side health check for M3U sources. |
| apps/…/playlist.operations.ts | Shows playlist persistence, metadata reads, conflict updates, field clearing, provider state projection, and favorite import completion. |
| apps/…/favorite-catalog.ts | Shows how saved favorite identity, catalog status, snapshots, and refresh reconciliation stay separate from provider catalog rows. |
| apps/…/favorite-queries.ts | Shows how the shared client receives present, missing, or unknown favorites with safe catalog joins. |
| apps/…/playlist-server-timezone.operations.ts | Shows the atomic rules for learning, preserving, and invalidating an Xtream server timezone. |
| apps/…/playlist-migration.operations.ts | Shows how older playlist data enters the SQLite product store without replaying a completed import. |
| apps/…/xtream.events.ts | Shows the desktop provider network boundary for Xtream requests and cancellation. |
| apps/…/stalker.events.ts | Shows the desktop provider network boundary for Stalker requests, discovery exemptions, and auth errors. |
| apps/…/epg.events.ts | Shows EPG source, query, local-file authorization, and channel-mapping behavior at the desktop boundary. |
| apps/…/app-update.service.ts | Shows update channel selection, support rules, status flow, release notes, and install handoff. |
| apps/…/app-update-release-notes.ts | Shows channel-specific release catalogs and release-note paging. |
| apps/…/database-worker-client.ts | Shows how the main process owns worker requests, results, failures, and shutdown. |
| apps/…/database.worker.ts | Shows the worker boundary for local data, favorite backup and restore, progress, cancellation, and long database operations. |
| apps/…/epg-parser.worker.ts | Shows streaming guide ingestion, data retention during a failed parse, and structured source errors. |
| apps/…/epg.events.ts | Shows the EPG IPC boundary, local file authorization setup, freshness and clear commands, and guide query mapping. |
| apps/…/epg-fetch.service.ts | Shows freshness decisions, batch ordering, force refresh behavior, and renderer queue updates. |
| apps/…/epg-worker.service.ts | Shows same-source sharing, serialized writer admission, source retirement, local authorization, and clear coordination. |
| apps/…/epg-fetch-operation.ts | Shows one fetch worker's progress, timeout, error, exit, and termination lifecycle. |
| apps/…/epg-fetch-queue.ts | Shows the single writer slot shared by all EPG imports. |
| apps/…/epg-source-generation.ts | Shows how clears retire queued and active source requests. |
| apps/…/epg-worker-runtime.ts | Shows worker bootstrap, termination barriers, and clear-worker lifecycle. |
| apps/…/playlist-refresh.worker.ts | Shows cancellable playlist fetch, file read, parse work, and worker event delivery. |
| apps/…/downloads.events.ts | Shows the host boundary for download commands, folder authorization, file checks, and renderer updates. |
| apps/…/download-catchup.ts | Shows the product rules that distinguish completed archive downloads from live or playlist streams. |
| apps/…/download-runtime.ts | Shows queued transfer, durable download state, cancellation, pause, and completion flow. |
| apps/…/download-recovery.ts | Shows how interrupted and partially finalized downloads are repaired after startup. |
| apps/…/recordings.events.ts | Shows recording queries, stop and remove actions, programme enrichment, file checks, and renderer updates. |
| apps/…/recording-recovery.ts | Shows how interrupted recordings are found and repaired after startup. |
| apps/…/embedded-mpv-recording-tracker.ts | Shows how MPV snapshots become durable recording states. |
| apps/…/embedded-mpv-native.service.ts | Shows embedded playback capability checks, native and frame-copy engines, session state, recording, reconnect, and cleanup. |
| apps/…/embedded-mpv-reconnect.ts | Shows the main-process reconnect policy for stream loss, VOD resume, live edge recovery, cancellation, and terminal engine errors. |
| apps/…/player.events.ts | Shows the bridge from shared playback actions to MPV, VLC, and display sleep control. |
| apps/…/single-instance.ts | Shows profile protection and second-launch forwarding. |
| apps/…/project.json | Shows the dependency order for web, worker, native, package, and make targets. |
| electron-builder.json | Shows desktop package identity, resources, file associations, and platform targets. |
| tools/…/verify-electron-package-layout.mjs | Shows the checks that turn build output into a valid installed runtime. |