Skip to content

feat: add network file caching for SMB/NFS mounts#27

Merged
pythoninthegrass merged 3 commits into
mainfrom
begin-backlog-task-295
Mar 19, 2026
Merged

feat: add network file caching for SMB/NFS mounts#27
pythoninthegrass merged 3 commits into
mainfrom
begin-backlog-task-295

Conversation

@pythoninthegrass

Copy link
Copy Markdown
Collaborator

Add optional local caching for audio files on network mounts. When enabled in Settings > Audio, files are copied to a local cache directory before playback. Cache uses LRU eviction with configurable max size (0.5-20 GB, default 2 GB) and can optionally persist across restarts.

  • NetworkFileCache: disk-based LRU cache with SHA-256 path hashing, extension preservation for Rodio format detection, rebuild-from-disk on startup, and byte-based eviction
  • Mount detection: macOS (libc::statfs MNT_LOCAL), Linux (/proc/mounts fs type matching), Windows (UNC paths + GetDriveTypeW DRIVE_REMOTE)
  • Audio pipeline integration: resolve_cached_path intercepts audio_load and audio_load_and_play commands transparently
  • Exit cleanup: refactor .run() to .build() + .run() with RunEvent::Exit handler that purges non-persistent cache
  • Settings UI: Audio section with enable toggle, persistent toggle, size slider, cache status card, and purge button
  • 16 new Rust unit tests, 7 Playwright E2E tests

pythoninthegrass and others added 3 commits March 8, 2026 00:10
Add optional local caching for audio files on network mounts. When
enabled in Settings > Audio, files are copied to a local cache directory
before playback. Cache uses LRU eviction with configurable max size
(0.5-20 GB, default 2 GB) and can optionally persist across restarts.

- NetworkFileCache: disk-based LRU cache with SHA-256 path hashing,
  extension preservation for Rodio format detection, rebuild-from-disk
  on startup, and byte-based eviction
- Mount detection: macOS (libc::statfs MNT_LOCAL), Linux (/proc/mounts
  fs type matching), Windows (UNC paths + GetDriveTypeW DRIVE_REMOTE)
- Audio pipeline integration: resolve_cached_path intercepts audio_load
  and audio_load_and_play commands transparently
- Exit cleanup: refactor .run() to .build() + .run() with RunEvent::Exit
  handler that purges non-persistent cache
- Settings UI: Audio section with enable toggle, persistent toggle,
  size slider, cache status card, and purge button
- 16 new Rust unit tests, 7 Playwright E2E tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Combine network file caching (PR #27) with audio device selection,
lyrics support, and other features merged to main since branch diverged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ttings

- Add audio output device selector to settings-audio.html partial
  (merged from main's inline HTML into the PR's partial template)
- Mock window.__TAURI__ in network-cache-settings tests so toggle
  handlers no longer exit early without Tauri context
- Use exact text matching for "Used"/"Files" locators to avoid
  strict mode violations from ambiguous selectors

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pythoninthegrass pythoninthegrass merged commit e6c55ae into main Mar 19, 2026
4 checks passed
@pythoninthegrass pythoninthegrass deleted the begin-backlog-task-295 branch March 19, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant