fully fix

This commit is contained in:
notgne2 2021-01-27 00:50:27 -07:00
parent 9569f040a3
commit 2c1b6545d2
No known key found for this signature in database
GPG Key ID: BB661E172B42A7F8

View File

@ -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!');
} }