Skip to content

Commit 825b0ee

Browse files
authored
fix: -s / --select not working (#304)
* fix: select only being set too late, causing more than intended to be reserved and downloaded. * fix: linting
1 parent fa247c5 commit 825b0ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/cmd.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,15 +302,15 @@ async function runDownload (torrentId) {
302302
announce: argv.announce
303303
})
304304

305+
if ('select' in argv) {
306+
torrent.so = argv.select.toString()
307+
}
308+
305309
if (argv.verbose) {
306310
torrent.on('warning', handleWarning)
307311
}
308312

309313
torrent.on('infoHash', () => {
310-
if ('select' in argv) {
311-
torrent.so = argv.select.toString()
312-
}
313-
314314
if (argv.quiet) return
315315

316316
updateMetadata()

0 commit comments

Comments
 (0)