8 Commits

Author SHA1 Message Date
Jonathan Sykes
ed9f93b0b7 fix: stop playback stutter and save failures via async yt-dlp, per-download OPFS workers, lazy playback blobs, GPU composite trims, and landscape pane scrolling 2026-07-02 23:40:49 +08:00
Claude Worker
8018060d26 feat: update ready keeps showing even after updating
Task #61 completed by ClaudeQueue

ClaudeQueue
2026-07-01 17:40:50 +00:00
Claude Worker
395af38246 feat: update ready reloade stuck
Task #55 completed by ClaudeQueue

ClaudeQueue
2026-07-01 02:38:45 +00:00
Claude Worker
7cf3517dd3 feat: ensure ui automatically updates regardless of version number
Task #53 completed by ClaudeQueue

ClaudeQueue
2026-06-30 21:14:06 +00:00
Jonathan Sykes
ebe60a7be2 fix: start next track at beginning (or A point) instead of resuming, and store A-B per playlist
When auto-advancing through a queue or playlist — or stepping with
next/prev — the next video previously jumped to its saved resume
timestamp. A freshly selected track now starts at the beginning, or at
the A marker when an A-B loop is set for it. Resuming still applies when
you reopen a single video directly.

A-B markers set while playing from a playlist are now stored on that
playlist's own copy of the video (entry.ab), so each playlist keeps its
own loop and the markers sync to the database alongside the playlist.
Non-playlist playback keeps using the global per-video marker map.

Bumps service worker to v1.0.3 to bust the client cache.
2026-07-01 04:29:00 +08:00
Jonathan Sykes
fec069479f chore: bump service worker version to v1.0.2 to trigger client updates 2026-07-01 01:24:45 +08:00
Jonathan Sykes
f266c4ffb9 fix: bump service worker cache to v1.0.1 to evict stale app shell
Existing PWA installs cache the app shell (app.js et al.) cache-first under
ytplayer-v1.0.0. Without a version bump they'd keep serving the old app.js
that lacked WEB-mode OPFS support, so the offline-cache fix would never reach
already-installed clients. Bumping forces activate → old cache delete →
re-fetch, and triggers the in-app 'Update ready' banner.
2026-06-30 08:40:23 +08:00
Jonathan Sykes
4efa1d1182 feat: convert to PWA — OPFS storage, service worker, Bun/Hono server
- Move native shells (Zig/src, Tauri/src-tauri, app.zon, releases) to legacy/
- Add Bun + Hono server with yt-dlp proxy endpoints (search, channel, streams,
  download), libsql (concurrent SQLite fork) for fingerprint-keyed playlist/
  history sync, and static file serving for the frontend
- Add Dockerfile + docker-compose.yml (single container, volume-mounted DB)
- Add frontend/sw.js: app-shell cache-first, /api/* network-only,
  thumbnails stale-while-revalidate, SW_UPDATE_AVAILABLE broadcast,
  SKIP_WAITING message handler for seamless auto-update
- Add frontend/manifest.webmanifest: standalone PWA, vermilion theme,
  search/history shortcuts
- Add frontend/icons/icon-{192,512}.png: generated PWA icons
- Add frontend/fingerprint.js: canvas+UA djb2 fingerprint, localStorage-cached,
  exposes window.getFingerprint() for server-side playlist keying
- Add frontend/opfs.js: full OPFS video store (writeFromResponse streams
  directly without full-file buffering), exposes window.OPFS
- Add scripts/make-pwa-icons.js: regenerate icons without external deps
- Patch frontend/app.js: WEB mode detection, webFetch + opfs* bridge wrappers,
  API object routes to WEB helpers when no native bridge present,
  Player.loadVideo handles OPFS blob URLs + revokes them on next load,
  SW registration + update banner in boot()
- Patch frontend/index.html: manifest link, theme-color, Apple PWA meta,
  CSP blob:/worker-src, fingerprint.js + opfs.js script tags
- Patch frontend/styles.css: .toast-update + .toast-reload-btn for update banner
- Native Tauri/Zig builds unchanged — all new code is additive via WEB flag
2026-06-30 06:43:23 +08:00