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() {
|
static async scanLibrary() {
|
||||||
ProviderDB.init()
|
ProviderDB.init()
|
||||||
let folders = utils.getStoreValue("libraryPrefs.localPaths")
|
let folders = utils.getStoreValue("libraryPrefs.localPaths")
|
||||||
if (folders == null || folders.length == null || folders.length == 0) folders = ["D:\\Music"]
|
if (folders == null || folders.length == null || folders.length == 0) folders = []
|
||||||
console.log('folders', folders)
|
|
||||||
let files: any[] = []
|
let files: any[] = []
|
||||||
for (var folder of folders) {
|
for (var folder of folders) {
|
||||||
// get files from the Music folder
|
// get files from the Music folder
|
||||||
files = files.concat(await LocalFiles.getFiles(folder))
|
files = files.concat(await LocalFiles.getFiles(folder))
|
||||||
}
|
}
|
||||||
|
|
||||||
//console.log("cider.files", files2);
|
|
||||||
let supporttedformats = ["mp3", "aac", "webm", "flac", "m4a", "ogg", "wav", "opus"]
|
let supporttedformats = ["mp3", "aac", "webm", "flac", "m4a", "ogg", "wav", "opus"]
|
||||||
let audiofiles = files.filter(f => supporttedformats.includes(f.substring(f.lastIndexOf('.') + 1)));
|
let audiofiles = files.filter(f => supporttedformats.includes(f.substring(f.lastIndexOf('.') + 1)));
|
||||||
// console.log("cider.files2", audiofiles, audiofiles.length);
|
|
||||||
let metadatalist = []
|
let metadatalist = []
|
||||||
let metadatalistart = []
|
let metadatalistart = []
|
||||||
let numid = 0;
|
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
|
if (this.localSongs.length === 0 && numid % 10 === 0) { // send updated chunks only if there is no previous database
|
||||||
this.eventEmitter.emit('newtracks', metadatalist)}
|
this.eventEmitter.emit('newtracks', metadatalist)}
|
||||||
}
|
}
|
||||||
} catch (e) {console.error("error:", e)}
|
} catch (e) {console.error("localfiles error:", e)}
|
||||||
}
|
}
|
||||||
// console.log('metadatalist', metadatalist);
|
// console.log('metadatalist', metadatalist);
|
||||||
this.localSongs = metadatalist;
|
this.localSongs = metadatalist;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue