mirror of
https://github.com/Andre-Bzk/twitch4steamdeck.git
synced 2026-11-15 15:43:08 +01:00
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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user