fix(12-02): reorder orphan cleanup to delete FK children before recordings

recording_genres and release_group_recordings reference recordings.id,
so they must be deleted BEFORE the recordings table is cleaned.
Also extends toast duration to 8s for readability.
This commit is contained in:
2026-03-13 13:38:39 -04:00
parent cf004986c9
commit 1d735c3a5f
7 changed files with 119 additions and 55 deletions
+10 -9
View File
@@ -1,9 +1,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {sqlcgen} from '../models';
import {library} from '../models';
import {context} from '../models';
export function AddLibrary(arg1:string):Promise<library.Info>;
export function AddLibrary(arg1:string):Promise<sqlcgen.Library>;
export function CancelAllScans():Promise<void>;
@@ -15,8 +16,6 @@ export function FullRescan():Promise<library.ScanMetrics>;
export function GetAlbumTracks(arg1:number):Promise<Array<library.Track>>;
export function GetAllLibrariesWithTrackCounts():Promise<Array<library.Info>>;
export function GetAlbumsByArtist(arg1:number):Promise<Array<library.Album>>;
export function GetAllAlbums():Promise<Array<library.Album>>;
@@ -25,6 +24,8 @@ export function GetAllArtists():Promise<Array<library.Artist>>;
export function GetAllGenresWithCounts():Promise<Array<library.GenreWithCount>>;
export function GetAllLibrariesWithTrackCounts():Promise<Array<library.Info>>;
export function GetAllTracks():Promise<Array<library.Track>>;
export function GetRemovalImpact(arg1:number):Promise<library.RemovalImpact>;
@@ -39,15 +40,13 @@ export function IsScanPaused():Promise<boolean>;
export function PauseScan():Promise<void>;
export function RemoveLibrary(arg1:number):Promise<library.RemovalSummary>;
export function RenameLibrary(arg1:number, arg2:string):Promise<void>;
export function QueuedLibraryNames():Promise<Array<string>>;
export function ResumeScan():Promise<void>;
export function RemoveLibrary(arg1:number):Promise<library.RemovalSummary>;
export function Scan():Promise<library.ScanMetrics>;
export function RenameLibrary(arg1:number,arg2:string):Promise<void>;
export function ResumeScan():Promise<void>;
export function ScanAllLibraries():Promise<void>;
@@ -57,4 +56,6 @@ export function SearchTracks(arg1:string):Promise<Array<library.Track>>;
export function SetContext(arg1:context.Context):Promise<void>;
export function SetRemovalHooks(arg1:library.RemovalHooks):Promise<void>;
export function SetRescanHooks(arg1:library.RescanHooks):Promise<void>;
+12 -12
View File
@@ -26,10 +26,6 @@ export function GetAlbumTracks(arg1) {
return window['go']['library']['Library']['GetAlbumTracks'](arg1);
}
export function GetAllLibrariesWithTrackCounts() {
return window['go']['library']['Library']['GetAllLibrariesWithTrackCounts']();
}
export function GetAlbumsByArtist(arg1) {
return window['go']['library']['Library']['GetAlbumsByArtist'](arg1);
}
@@ -46,6 +42,10 @@ export function GetAllGenresWithCounts() {
return window['go']['library']['Library']['GetAllGenresWithCounts']();
}
export function GetAllLibrariesWithTrackCounts() {
return window['go']['library']['Library']['GetAllLibrariesWithTrackCounts']();
}
export function GetAllTracks() {
return window['go']['library']['Library']['GetAllTracks']();
}
@@ -74,6 +74,10 @@ export function PauseScan() {
return window['go']['library']['Library']['PauseScan']();
}
export function QueuedLibraryNames() {
return window['go']['library']['Library']['QueuedLibraryNames']();
}
export function RemoveLibrary(arg1) {
return window['go']['library']['Library']['RemoveLibrary'](arg1);
}
@@ -82,18 +86,10 @@ export function RenameLibrary(arg1, arg2) {
return window['go']['library']['Library']['RenameLibrary'](arg1, arg2);
}
export function QueuedLibraryNames() {
return window['go']['library']['Library']['QueuedLibraryNames']();
}
export function ResumeScan() {
return window['go']['library']['Library']['ResumeScan']();
}
export function Scan() {
return window['go']['library']['Library']['Scan']();
}
export function ScanAllLibraries() {
return window['go']['library']['Library']['ScanAllLibraries']();
}
@@ -110,6 +106,10 @@ export function SetContext(arg1) {
return window['go']['library']['Library']['SetContext'](arg1);
}
export function SetRemovalHooks(arg1) {
return window['go']['library']['Library']['SetRemovalHooks'](arg1);
}
export function SetRescanHooks(arg1) {
return window['go']['library']['Library']['SetRescanHooks'](arg1);
}