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:
@@ -40,6 +40,20 @@ export namespace library {
|
||||
this.Name = source["Name"];
|
||||
}
|
||||
}
|
||||
export class GenreWithCount {
|
||||
Name: string;
|
||||
TrackCount: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new GenreWithCount(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.Name = source["Name"];
|
||||
this.TrackCount = source["TrackCount"];
|
||||
}
|
||||
}
|
||||
export class Info {
|
||||
id: number;
|
||||
name: string;
|
||||
@@ -58,6 +72,18 @@ export namespace library {
|
||||
this.trackCount = source["trackCount"];
|
||||
}
|
||||
}
|
||||
export class RemovalHooks {
|
||||
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new RemovalHooks(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
|
||||
}
|
||||
}
|
||||
export class RemovalImpact {
|
||||
trackCount: number;
|
||||
playlistsAffected: number;
|
||||
@@ -96,20 +122,6 @@ export namespace library {
|
||||
this.queueItemsRemoved = source["queueItemsRemoved"];
|
||||
}
|
||||
}
|
||||
export class GenreWithCount {
|
||||
Name: string;
|
||||
TrackCount: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new GenreWithCount(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.Name = source["Name"];
|
||||
this.TrackCount = source["TrackCount"];
|
||||
}
|
||||
}
|
||||
export class RescanHooks {
|
||||
|
||||
|
||||
@@ -606,6 +618,48 @@ export namespace queue {
|
||||
|
||||
}
|
||||
|
||||
export namespace sqlcgen {
|
||||
|
||||
export class Library {
|
||||
ID: number;
|
||||
Name: string;
|
||||
Path: string;
|
||||
// Go type: time
|
||||
CreatedAt: any;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new Library(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.ID = source["ID"];
|
||||
this.Name = source["Name"];
|
||||
this.Path = source["Path"];
|
||||
this.CreatedAt = this.convertValues(source["CreatedAt"], null);
|
||||
}
|
||||
|
||||
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
||||
if (!a) {
|
||||
return a;
|
||||
}
|
||||
if (a.slice && a.map) {
|
||||
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
||||
} else if ("object" === typeof a) {
|
||||
if (asMap) {
|
||||
for (const key of Object.keys(a)) {
|
||||
a[key] = new classs(a[key]);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
return new classs(a);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export namespace tracklist {
|
||||
|
||||
export class Column {
|
||||
|
||||
Reference in New Issue
Block a user