pruneEmptyEntities deleted empty albums but never the cover_art rows
they referenced, so removing the last track of an album leaked the row
and its files forever (the janitor's covers sweep computes its live set
from cover_art.file_path, keeping the orphaned row's files exempt).
Extracts one sweep used by the scan path, RemoveFromLibrary and RemoveLibrary.
| commit | issue |
|---|---|
| `32bb6491` fix(library): sweep orphaned cover art when an album empties | #247 |
## Verification
- `go test ./backend/library/...`
- `golangci-lint run .`
`pruneEmptyEntities` deleted empty albums but never the `cover_art` rows
they referenced, so removing the last track of an album leaked the row
and its files forever (the janitor's covers sweep computes its live set
from `cover_art.file_path`, keeping the orphaned row's files exempt).
Extracts one sweep used by the scan path, `RemoveFromLibrary` and
`RemoveLibrary`.
Closes #247
pruneEmptyEntities deleted empty albums but never the cover_art rows
they referenced, so removing the last track of an album leaked the row
and its files forever — the janitor's covers sweep computes its live set
from cover_art.file_path, which keeps the orphaned row's files exempt.
Extract sweepOrphanedCoverArt/removeCoverArtFiles as one implementation
and run it from pruneEmptyEntities (scan orphan path and
RemoveFromLibrary) and RemoveLibrary alike.
Closes#247
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
32bb6491fix(library): sweep orphaned cover art when an album emptiesVerification
go test ./backend/library/...golangci-lint run .pruneEmptyEntitiesdeleted empty albums but never thecover_artrowsthey referenced, so removing the last track of an album leaked the row
and its files forever (the janitor's covers sweep computes its live set
from
cover_art.file_path, keeping the orphaned row's files exempt).Extracts one sweep used by the scan path,
RemoveFromLibraryandRemoveLibrary.Closes #247