asjdaoisjdiaoswd

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

View File

@ -119,8 +119,12 @@ async function thing() {
await fs.mkdir(`${os.homedir()}/Music/${album}`, { recursive: true }); await fs.mkdir(`${os.homedir()}/Music/${album}`, { recursive: true });
} catch (err) { } } catch (err) { }
if (!(await fs.exists(path))) { try {
await fs.access(path);
console.log("Path already exists..?");
} catch (err) {
console.log(`Encoding to: ${path}`); console.log(`Encoding to: ${path}`);
if (image) { if (image) {
await exec(`ffmpeg -i "${file}" -i "${image}" -map 0:0 -map 1:0 -id3v2_version 4 -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" "${path}"`); await exec(`ffmpeg -i "${file}" -i "${image}" -map 0:0 -map 1:0 -id3v2_version 4 -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" "${path}"`);
} else { } else {