Skip to content

Commit

Permalink
feat: add magnetURI on seeding and infoHash on downloading (#308)
Browse files Browse the repository at this point in the history
* feat: add magnetURI on seeding and infoHash on downloading.

* fix: change `MagnetURI` to just `Magnet`

* fix: requested changes, else rather than double ifs and re-add whitespace.
  • Loading branch information
SilentBot1 authored Jun 2, 2024
1 parent 338621a commit b36a82e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,11 @@ function drawTorrent (torrent) {

line(chalk`{green ${seeding ? 'Seeding' : 'Downloading'}:} {bold ${torrent.name}}`)

if (seeding) line(chalk`{green Info hash:} ${torrent.infoHash}`)
if (!seeding) {
line(chalk`{green Info hash:} ${torrent.infoHash}`)
} else {
line(chalk`{green Magnet:} ${torrent.magnetURI}`)
}

const portInfo = []
if (argv['torrent-port']) portInfo.push(chalk`{green Torrent port:} ${argv['torrent-port']}`)
Expand Down

0 comments on commit b36a82e

Please sign in to comment.