Skip to content

Commit

Permalink
fix: -s / --select not working (#304)
Browse files Browse the repository at this point in the history
* fix: select only being set too late, causing more than intended to be reserved and downloaded.

* fix: linting
  • Loading branch information
SilentBot1 committed Jun 2, 2024
1 parent fa247c5 commit 825b0ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,15 +302,15 @@ async function runDownload (torrentId) {
announce: argv.announce
})

if ('select' in argv) {
torrent.so = argv.select.toString()
}

if (argv.verbose) {
torrent.on('warning', handleWarning)
}

torrent.on('infoHash', () => {
if ('select' in argv) {
torrent.so = argv.select.toString()
}

if (argv.quiet) return

updateMetadata()
Expand Down

0 comments on commit 825b0ee

Please sign in to comment.