feat(12-01): implement library CRUD methods and orphan cleanup pipeline
- Add AddLibrary, RenameLibrary, RemoveLibrary, GetRemovalImpact methods - RemoveLibrary follows exact order: phantom populate → delete audio_files → orphan cleanup → commit → FTS5 rebuild → cover art file cleanup → queue compact → events - Add cancelLibraryScan and currentTrackBelongsToLibrary helpers - Add RemovalHooks type and removalHooks field on Library struct - Add LibraryAdded, LibraryRenamed, LibraryRemoved event constants - Regenerate frontend events.ts with new CRUD events - All hand-crafted SQL has SAFETY comments per project convention - Dual artist_credit FK check (recordings + release_groups) for orphan cleanup
This commit is contained in:
@@ -60,3 +60,10 @@ const (
|
||||
LibraryScanQueued = "LibraryScanQueued"
|
||||
LibraryScanQueueDrained = "LibraryScanQueueDrained"
|
||||
)
|
||||
|
||||
// Library CRUD events.
|
||||
const (
|
||||
LibraryAdded = "LibraryAdded"
|
||||
LibraryRenamed = "LibraryRenamed"
|
||||
LibraryRemoved = "LibraryRemoved"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user