mirror of
https://github.com/chuot/rdio-scanner.git
synced 2026-08-16 09:53: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) {
|
switch (dirWatch.type) {
|
||||||
case 'trunk-recorder': {
|
case 'trunk-recorder': {
|
||||||
|
setTimeout(() => {
|
||||||
const metaFile = path.resolve(file.dir, `${file.name}.json`);
|
const metaFile = path.resolve(file.dir, `${file.name}.json`);
|
||||||
|
|
||||||
if (!fs.existsSync(metaFile)) {
|
if (!fs.existsSync(metaFile)) {
|
||||||
|
|
@ -116,11 +117,13 @@ class DirWatch {
|
||||||
this.unlink(metaFile);
|
this.unlink(metaFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'sdrtrunk': {
|
case 'sdrtrunk': {
|
||||||
|
setTimeout(() => {
|
||||||
const metaFile = path.resolve(file.dir, `${file.name}.mbe`);
|
const metaFile = path.resolve(file.dir, `${file.name}.mbe`);
|
||||||
|
|
||||||
if (!fs.existsSync(metaFile)) {
|
if (!fs.existsSync(metaFile)) {
|
||||||
|
|
@ -145,6 +148,7 @@ class DirWatch {
|
||||||
if (dirWatch.deleteAfter) {
|
if (dirWatch.deleteAfter) {
|
||||||
this.unlink(metaFile);
|
this.unlink(metaFile);
|
||||||
}
|
}
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue