diff options
Diffstat (limited to 'bin/cmd.js')
-rwxr-xr-x | bin/cmd.js | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -429,6 +429,14 @@ function runDownload (torrentId) { } function runSeed (input) { + if (path.extname(input) === '.torrent' || /^magnet:/.test(input)) { + // `webtorrent seed` is meant for creating a new torrent based on a file or folder + // of content, not a torrent id (.torrent or a magnet uri). If this command is used + // incorrectly, let's just do the right thing. + runDownload(input) + return + } + var client = new WebTorrent({ blocklist: argv.blocklist }) |