Skip to content

Commit

Permalink
v1
Browse files Browse the repository at this point in the history
  • Loading branch information
ReeZey committed Feb 27, 2023
1 parent 747c51c commit 739e8bf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ async function main() {
continue;
}

let isDir = statSync(input).isDirectory();
let isDir = statSync(currentArg).isDirectory();
if (isDir) {
for await (let fileName of getFiles(input)) {
for await (let fileName of getFiles(currentArg)) {
await convertMedia(fileName);
}
} else {
await convertMedia(input);
await convertMedia(currentArg);
}
}

console.log("all done, press any button to exit");
//setTimeout(() => {}, 5000);
process.stdout.resume();
console.log("all done");
setTimeout(() => {}, 5000);
//process.stdin.resume();
}
main();

Expand All @@ -44,7 +44,7 @@ async function convertMedia(fileName){
let code = await optimiseMedia(fileName);
if (code != 0) {
console.log("an error occured when reading file, probably ffmpeg doesn't understand format");
rej();
return res();
}
console.log("done!");
await moveMedia(fileName);
Expand Down

0 comments on commit 739e8bf

Please sign in to comment.