Skip to content

Commit

Permalink
fix: minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
wxsms committed Jan 22, 2022
1 parent 11ded58 commit 07cb9f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -29,7 +29,7 @@ program
validateInt
)
.option('--to <number>', 'limit to page download to, 1-based.', validateInt)
.option('--threads <number>', 'how many download threads.', validateInt, 5)
.option('--threads <number>', 'how many download threads.', validateInt, 10)
.option(
'--naming <string>',
`change the downloaded files' naming pattern. available: INDEX, TITLE, AUTHOR, DATE`,
Expand Down
7 changes: 3 additions & 4 deletions src/download2mp3.js
Expand Up @@ -9,11 +9,10 @@ export async function download2mp3({ url, index }) {
const argv = program.opts();
try {
const { filename, bar } = await download(url, index);
if (argv.skipMp3) {
return;
if (!argv.skipMp3) {
await flv2mp3(filename, bar);
await fs.promises.unlink(filename);
}
await flv2mp3(filename, bar);
await fs.promises.unlink(filename);
bar.tick({ status: 'done' });
} catch (err) {
if (argv.debug) {
Expand Down

0 comments on commit 07cb9f6

Please sign in to comment.