gimp v2
This commit is contained in:
parent
b70ab0b522
commit
2dee6ade96
1 changed files with 2 additions and 5 deletions
|
@ -34,18 +34,15 @@ export class LocalFiles {
|
|||
static async scanLibrary() {
|
||||
ProviderDB.init()
|
||||
let folders = utils.getStoreValue("libraryPrefs.localPaths")
|
||||
if (folders == null || folders.length == null || folders.length == 0) folders = ["D:\\Music"]
|
||||
console.log('folders', folders)
|
||||
if (folders == null || folders.length == null || folders.length == 0) folders = []
|
||||
let files: any[] = []
|
||||
for (var folder of folders) {
|
||||
// get files from the Music folder
|
||||
files = files.concat(await LocalFiles.getFiles(folder))
|
||||
}
|
||||
|
||||
//console.log("cider.files", files2);
|
||||
let supporttedformats = ["mp3", "aac", "webm", "flac", "m4a", "ogg", "wav", "opus"]
|
||||
let audiofiles = files.filter(f => supporttedformats.includes(f.substring(f.lastIndexOf('.') + 1)));
|
||||
// console.log("cider.files2", audiofiles, audiofiles.length);
|
||||
let metadatalist = []
|
||||
let metadatalistart = []
|
||||
let numid = 0;
|
||||
|
@ -118,7 +115,7 @@ export class LocalFiles {
|
|||
if (this.localSongs.length === 0 && numid % 10 === 0) { // send updated chunks only if there is no previous database
|
||||
this.eventEmitter.emit('newtracks', metadatalist)}
|
||||
}
|
||||
} catch (e) {console.error("error:", e)}
|
||||
} catch (e) {console.error("localfiles error:", e)}
|
||||
}
|
||||
// console.log('metadatalist', metadatalist);
|
||||
this.localSongs = metadatalist;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue