[Bug]: FLAC copies in the music cache are never cleaned up

Aperta
#119 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
backend

Direzione di ricerca

Start at src/api/music.rs:1266, where flac_copy writes the cache keyed by path, size and mtime, and trace what else reads or deletes files under cache/music/. Then find the scan/indexing path to see where track keys are invalidated on change or deletion, since that is where stale copies would be pruned. Done means the cache is bounded by an eviction rule and orphaned copies are removed during scans, with a test covering both.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

[!NOTE]
This issue was written by Claude (Claude Opus 5.5) from a code review session with @PhrolovaMoe. It was found by reading the code and hasn't been reproduced on a running server.

Version

0.40.0 (feat/desktop, 017a837b)

Area

Other

What happened?

flac_copy writes a FLAC copy of a track to cache/music/ the first time it's asked for (src/api/music.rs:1266), keyed by path, size and mtime. Nothing removes them, including copies of tracks that changed or were deleted, so the cache grows with every lossy-to-lossless request.

Expected behavior

The cache has a size limit or an expiry.

Suggested fix

Evict least recently used copies over a size limit (or older than N days), and remove copies whose key no longer matches a track during scans.

Lingua principale
TypeScript
Stelle
4
Fork
1
Merge medio
4h 49m
PR unite (30g)
5

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tinystream-dev/tinystream

Tutte le issue di tinystream-dev/tinystream

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.