fix: surface playback errors and stabilize disk cache size

Playback errors in the global overlay (direct-start from Browse/Category/
StreamList screens) were silently discarded — the stream disappeared with
no user feedback. Now shows an error overlay with the streamlink message
and a dismiss hint; hls.js fatal errors use the same path.

Chromium computes disk-cache-size dynamically from free disk space, so
the value differs between runs. The cache index then contains a size that
no longer matches, producing "Invalid cache (current) size" on shutdown.
A fixed 500 MB cap keeps the value stable across restarts.

The cache classification thresholds (500 MB / 1 GB) were designed for an
uncapped cache. With a fixed 500 MB limit, the cache can never enter those
states, leaving dead UI states and unused logic behind.
This commit is contained in:
Andre
2026-05-12 21:02:21 +02:00
parent 4fa308b9e6
commit ed790dc3cd
4 changed files with 38 additions and 44 deletions
+3
View File
@@ -12,6 +12,9 @@ const isDev = !app.isPackaged
// Erlaubt video.play() ohne vorangehende User-Geste (nötig, weil play() in hls.js-Callbacks
// aufgerufen wird, die asynchron weit nach dem ursprünglichen Click-Event stattfinden).
app.commandLine.appendSwitch('autoplay-policy', 'no-user-gesture-required')
// Explizite Cache-Größe verhindert Chromiums dynamische Größenberechnung, die bei
// wechselndem freiem Speicherplatz zu "Invalid cache (current) size"-Fehlern führt.
app.commandLine.appendSwitch('disk-cache-size', String(500 * 1024 * 1024))
function createWindow(): BrowserWindow {
const isLinux = process.platform === 'linux'