mirror of
https://github.com/chuot/rdio-scanner.git
synced 2026-08-16 18:03:01 -06:00
Add a 2 seconds delay on DirWatch to give time for the meta file to be created
This commit is contained in:
parent
349d69419f
commit
ed16727ce7
|
|
@ -90,6 +90,7 @@ class DirWatch {
|
|||
|
||||
switch (dirWatch.type) {
|
||||
case 'trunk-recorder': {
|
||||
setTimeout(() => {
|
||||
const metaFile = path.resolve(file.dir, `${file.name}.json`);
|
||||
|
||||
if (!fs.existsSync(metaFile)) {
|
||||
|
|
@ -116,11 +117,13 @@ class DirWatch {
|
|||
this.unlink(metaFile);
|
||||
}
|
||||
}
|
||||
}, 2000);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 'sdrtrunk': {
|
||||
setTimeout(() => {
|
||||
const metaFile = path.resolve(file.dir, `${file.name}.mbe`);
|
||||
|
||||
if (!fs.existsSync(metaFile)) {
|
||||
|
|
@ -145,6 +148,7 @@ class DirWatch {
|
|||
if (dirWatch.deleteAfter) {
|
||||
this.unlink(metaFile);
|
||||
}
|
||||
}, 2000);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue