configurable scan parallelism based on hdd or sdd
This commit is contained in:
+4
@@ -5,6 +5,8 @@ import {context} from '../models';
|
||||
|
||||
export function GetLibraryDirectory():Promise<string>;
|
||||
|
||||
export function GetScanConcurrency():Promise<string>;
|
||||
|
||||
export function Load():Promise<void>;
|
||||
|
||||
export function Save():Promise<void>;
|
||||
@@ -15,4 +17,6 @@ export function SetContext(arg1:context.Context):Promise<void>;
|
||||
|
||||
export function SetLibraryDirectory(arg1:string):Promise<void>;
|
||||
|
||||
export function SetScanConcurrency(arg1:string):Promise<void>;
|
||||
|
||||
export function Validate():Promise<void>;
|
||||
|
||||
@@ -6,6 +6,10 @@ export function GetLibraryDirectory() {
|
||||
return window['go']['config']['Config']['GetLibraryDirectory']();
|
||||
}
|
||||
|
||||
export function GetScanConcurrency() {
|
||||
return window['go']['config']['Config']['GetScanConcurrency']();
|
||||
}
|
||||
|
||||
export function Load() {
|
||||
return window['go']['config']['Config']['Load']();
|
||||
}
|
||||
@@ -26,6 +30,10 @@ export function SetLibraryDirectory(arg1) {
|
||||
return window['go']['config']['Config']['SetLibraryDirectory'](arg1);
|
||||
}
|
||||
|
||||
export function SetScanConcurrency(arg1) {
|
||||
return window['go']['config']['Config']['SetScanConcurrency'](arg1);
|
||||
}
|
||||
|
||||
export function Validate() {
|
||||
return window['go']['config']['Config']['Validate']();
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
import {library} from '../models';
|
||||
import {context} from '../models';
|
||||
|
||||
export function FullRescan():Promise<void>;
|
||||
export function FullRescan():Promise<library.ScanMetrics>;
|
||||
|
||||
export function GetAlbumTracks(arg1:number):Promise<Array<library.Track>>;
|
||||
|
||||
@@ -11,7 +11,7 @@ export function GetAllAlbums():Promise<Array<library.Album>>;
|
||||
|
||||
export function GetAllTracks():Promise<Array<library.Track>>;
|
||||
|
||||
export function Scan():Promise<void>;
|
||||
export function Scan():Promise<library.ScanMetrics>;
|
||||
|
||||
export function SetContext(arg1:context.Context):Promise<void>;
|
||||
|
||||
|
||||
@@ -155,6 +155,66 @@ export namespace library {
|
||||
this.Year = source["Year"];
|
||||
}
|
||||
}
|
||||
export class ScanMetrics {
|
||||
total: number;
|
||||
loadExisting: number;
|
||||
walkDuration: number;
|
||||
extractionWallClock: number;
|
||||
dbWritesWallClock: number;
|
||||
orphanCleanup: number;
|
||||
postScanVariants: number;
|
||||
formatExtraction: Record<string, number>;
|
||||
formatCount: Record<string, number>;
|
||||
tagExtraction: number;
|
||||
durationExtraction: number;
|
||||
batchCommits: number;
|
||||
coverArtSave: number;
|
||||
thumbnailWallClock: number;
|
||||
thumbnailGeneration: number;
|
||||
thumbnailSmall: number;
|
||||
thumbnailMedium: number;
|
||||
thumbnailLarge: number;
|
||||
clearQueue: number;
|
||||
clearDatabase: number;
|
||||
clearCoverFiles: number;
|
||||
added: number;
|
||||
updated: number;
|
||||
skipped: number;
|
||||
removed: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new ScanMetrics(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.total = source["total"];
|
||||
this.loadExisting = source["loadExisting"];
|
||||
this.walkDuration = source["walkDuration"];
|
||||
this.extractionWallClock = source["extractionWallClock"];
|
||||
this.dbWritesWallClock = source["dbWritesWallClock"];
|
||||
this.orphanCleanup = source["orphanCleanup"];
|
||||
this.postScanVariants = source["postScanVariants"];
|
||||
this.formatExtraction = source["formatExtraction"];
|
||||
this.formatCount = source["formatCount"];
|
||||
this.tagExtraction = source["tagExtraction"];
|
||||
this.durationExtraction = source["durationExtraction"];
|
||||
this.batchCommits = source["batchCommits"];
|
||||
this.coverArtSave = source["coverArtSave"];
|
||||
this.thumbnailWallClock = source["thumbnailWallClock"];
|
||||
this.thumbnailGeneration = source["thumbnailGeneration"];
|
||||
this.thumbnailSmall = source["thumbnailSmall"];
|
||||
this.thumbnailMedium = source["thumbnailMedium"];
|
||||
this.thumbnailLarge = source["thumbnailLarge"];
|
||||
this.clearQueue = source["clearQueue"];
|
||||
this.clearDatabase = source["clearDatabase"];
|
||||
this.clearCoverFiles = source["clearCoverFiles"];
|
||||
this.added = source["added"];
|
||||
this.updated = source["updated"];
|
||||
this.skipped = source["skipped"];
|
||||
this.removed = source["removed"];
|
||||
}
|
||||
}
|
||||
export class Track {
|
||||
TrackName: string;
|
||||
ArtistName: string;
|
||||
|
||||
Reference in New Issue
Block a user