Commit Graph
13 Commits
Author SHA1 Message Date
Andre 123809fb9a fix: suppress HLS disk cache via Fetch API loader instead of XHR headers
Chromium evaluates the Fetch API's cache mode before the disk cache
storage decision; XHR request headers and onHeadersReceived patches do
not reliably prevent storage. The old approach silently allowed caching
regardless of the setting.

Moving cache suppression to a custom hls.js NoCacheLoader (Fetch with
cache: 'no-store') also eliminates the CORS preflight that Cache-Control
as a request header was triggering, which lets the main-process CORS
handler drop the applyNoStore branch entirely.
2026-05-15 11:31:32 +02:00
Andre c7bc1a23c0 feat: add file logging toggle and logout confirmation
File logging defaulted to always-on meant the log grew silently on every
run with no way to turn it off. Changing the default to error-only and
exposing the toggle in Settings lets users opt in only when debugging.

The logout button previously triggered immediately without warning, making
accidental logouts unrecoverable without re-running the device code flow.
A confirmation step (Ja/Nein, gamepad-navigable) prevents that.
2026-05-15 10:15:30 +02:00
Andre a5eaafbed3 feat: unify logging via electron-log and add IPC error boundary
Bug reports from Steam Deck (Flatpak) arrived without any useful context:
no terminal, no log file, no trace of what failed. Silent catches in
helixClient hid quota and token errors entirely. IPC handler exceptions
reached the renderer as rejected promises with no server-side record.

electron-log now writes to a rotating log file (~1 MB, 5 files) that
users can attach to bug reports. All IPC handlers are wrapped in
safeHandle, which logs and re-throws at the boundary. Optional-feature
failures (chapters, profile images, viewer counts) emit log.warn with
enough context to diagnose. A React ErrorBoundary catches render crashes
app-wide and logs them before showing a reload prompt.
2026-05-15 09:26:03 +02:00
Andre 9acf503afa style: translate all source code comments to English
German inline comments alongside English identifiers create a language
mismatch that makes the code harder to read for anyone not fluent in
German. All 28 affected comments across 14 files are now in English,
consistent with the rest of the project's written artifacts.
2026-05-15 08:49:52 +02:00
Andre ed790dc3cd 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.
2026-05-12 21:02:21 +02:00
Andre 78d67de35a feat: add HLS cache toggle and cache management to Settings
Chromium's HTTP disk cache accumulates HLS segments indefinitely on
Steam Deck — single-use segments have ~0% cache-hit rate but cause
unbounded SSD writes and disk growth. This wires up a runtime toggle
(default: cache disabled) so the user can control the behaviour without
restarting the app.

- Introduce src/main/prefs/hlsCachePref.ts as a shared mutable so
  index.ts and handlers.ts don't form a circular import
- Restructure onHeadersReceived in setupTwitchCors: CORS-bypass and
  no-store now run as independent blocks; no-store fires only for HLS
  extensions (.m3u8/.ts/.m4s/.aac, path before ?) when the toggle is off
- Add IPC handlers app:get-cache-size, app:clear-cache,
  app:set-hls-cache-enabled; wire through preload bridge and t4sd.d.ts
- Extend SettingsContext with hlsCacheEnabled (default false); push
  persisted value to main on mount and on every change
- Add "Speicher" section to SettingsScreen with HLS toggle row and
  cache-size display + clear button; gamepad-navigable
2026-05-11 19:40:50 +02:00
Andre 48ab6e551f feat: replace mpv with hls.js HTML5 video player (v0.4.0)
- Remove mpvController.ts and hlsTrimmer.ts entirely
  - Rewrite PlaybackService: streamlink --stream-url → HLS-URL → IPC event playback:hls-url
  - Add VideoPlayer.tsx (hls.js <video> wrapper, forwardRef with seek/seekTo/pause/play/stop/getCurrentTime)
  - Integrate VideoPlayer into ChannelScreen with direct videoRef calls (no IPC roundtrip for seek/pause)
  - Add global AppShell playback overlay for direct stream start (A-button in Browse/Category/StreamList)
  - Propagate onStartLive callback through BrowseScreen, CategoryScreen, StreamListScreen
  - Add CORS bypass for Twitch CDN (webRequest.onBeforeSendHeaders) and autoplay-policy switch
  - Update CSP: add media-src 'self' blob: for hls.js MediaSource API
  - Open chapter panel without stopping playback (pause + resume instead of stop/restart)
  - Drop IPC channels: seek, seekTo, resume, togglePause, getCurrentPosition, onTimeUpdate
  - Add IPC channel: playback:hls-url event with HlsUrlPayload
2026-05-10 08:33:07 +02:00
Andre 2e6c61b2c7 feat: maximize window on Linux to fill screen, bump version to 0.3.3
On Linux, the primary display resolution is queried and the window is  maximized on startup. This ensures a fullscreen experience both on the Steam Deck display and on external monitors/TVs when docked.
Windows/dev behavior unchanged.
2026-05-06 17:47:43 +02:00
Andre cfb8a0b790 Phase 6 abgeschlossen
- Fix: VOD-Kapitelwechsel und Following-Layout korrigiert
2026-04-11 13:03:31 +02:00
Andre f592de7aeb Phase 6 Fix 3
- Gamepad steamdeck repariert
- Navigation , Start und Stopp der Wiedergabe ist jetzt möglich
2026-04-10 22:03:42 +02:00
Andre 3e8e5c2078 Phase 3 abgeschlossen
Fix: Streamlink auth header entfernt, mpv-Pfad explizit aufgelöst
Livestream wird kann jetzt abgespielt werden
2026-04-08 17:44:48 +02:00
Andre 1f5d1254db Phase 2
- Twitch Helix-Client + Followed-Channels-Home-Screen
- Navigation über Sidebar
- Karten-Design überarbeitet
2026-04-07 20:57:25 +02:00
Andre 7d19ccf652 Projektstart
- Phase 1 "Twitch Login" abgeschlossen
2026-04-07 20:11:00 +02:00