fully fix
This commit is contained in:
parent
9569f040a3
commit
2c1b6545d2
16
index.js
16
index.js
@ -145,25 +145,11 @@ async function thing() {
|
|||||||
const tagArgsString = tagArgs.map(([tag, val]) => `${tag} "${val}"`).join(' ');
|
const tagArgsString = tagArgs.map(([tag, val]) => `${tag} "${val}"`).join(' ');
|
||||||
await exec(`id3v2 ${tagArgsString} "${path}"`);
|
await exec(`id3v2 ${tagArgsString} "${path}"`);
|
||||||
|
|
||||||
if (await fs.exists(Path.join(os.homedir(), '.tmsu'))) {
|
|
||||||
console.log('adding tmsu tags');
|
|
||||||
|
|
||||||
const fsTagArgs = [];
|
|
||||||
|
|
||||||
if (artist) fsTagArgs.push(['artist', artist]);
|
|
||||||
if (album) fsTagArgs.push(['album', album]);
|
|
||||||
|
|
||||||
if (fsTagArgs.length > 0) {
|
|
||||||
const fsTagArgsString = fsTagArgs.map(([tag, val]) => `"${tag}=${val}"`).join(' ');
|
|
||||||
await exec(`tmsu tag "${path}" ${fsTagArgsString}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(`Finished: ${album}/${artist} - ${title}`);
|
console.log(`Finished: ${album}/${artist} - ${title}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Finished everything, cleaning up...');
|
console.log('Finished everything, cleaning up...');
|
||||||
await dir.cleanup();
|
await fs.rmdir(TMP_DIR, { recursive: true });
|
||||||
console.log('Done!');
|
console.log('Done!');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user