feat(library): remove tracks from the library without touching the file

"Remove from library" deletes the audio_files row and records the path
as excluded, so the next scan does not import it again. Without the
exclusion the operation undoes itself on the next scan, which is worse
than not having it at all; the file on disk is never touched, which is
the promise the confirmation copy will make.

The soft scan compares the number of audio files on disk against the
number of rows, so both walks now skip excluded paths — otherwise the
two counts disagree forever and every launch queues a full scan of the
whole library. A full rescan clears the exclusions, which is the only
way back for a path removed by mistake until there is a UI for it.
This commit is contained in:
2026-08-13 13:04:59 -04:00
parent 91bab4e73e
commit acbe7c4676
20 changed files with 854 additions and 11 deletions
+7
View File
@@ -139,6 +139,13 @@ type DownloadRequest struct {
UpdatedAt time.Time
}
type ExcludedPath struct {
ID int64
LibraryID int64
FilePath string
ExcludedAt time.Time
}
type ExploreChampionFt struct {
Title string
ArtistName string