Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webtorrent-cli

Package Overview
Dependencies
Maintainers
9
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webtorrent-cli - npm Package Compare versions

Comparing version 3.5.0 to 3.5.1

33

bin/cmd.js

@@ -8,3 +8,2 @@ #!/usr/bin/env node

const ecstatic = require('ecstatic')
const executable = require('executable')
const fs = require('fs')

@@ -323,6 +322,6 @@ const http = require('http')

if (argv.onDone) {
cp.spawn(argv.onDone[0], argv.onDone.slice(1), { shell: true } )
.on('error', (err) => fatalError(err))
.stderr.on('data', (err) => fatalError(err))
.unref()
cp.spawn(argv.onDone[0], argv.onDone.slice(1), { shell: true })
.on('error', (err) => fatalError(err))
.stderr.on('data', (err) => fatalError(err))
.unref()
}

@@ -394,11 +393,11 @@ if (!playerName && !serving && argv.out && !argv['keep-seeding']) {

: `http://localhost:${server.address().port}`
let all_hrefs = []
let allHrefs = []
if (argv.playlist && (argv.mpv || argv.mplayer || argv.vlc || argv.smplayer)) {
// set the selected to the first file if not specified
if (typeof argv.select != 'number') {
if (typeof argv.select !== 'number') {
index = 0
}
torrent.files.forEach((file, i) => all_hrefs.push(JSON.stringify(`${href}/${i}/${encodeURIComponent(file.name)}`)))
torrent.files.forEach((file, i) => allHrefs.push(JSON.stringify(`${href}/${i}/${encodeURIComponent(file.name)}`)))
// set the first file to the selected index
all_hrefs = all_hrefs.slice(index, all_hrefs.length).concat(all_hrefs.slice(0, index))
allHrefs = allHrefs.slice(index, allHrefs.length).concat(allHrefs.slice(0, index))
} else {

@@ -422,3 +421,3 @@ href += `/${index}/${encodeURIComponent(torrent.files[index].name)}`

playerArgs.vlc[0] = vlcCmd
argv.playlist ? openPlayer(playerArgs.vlc.concat(all_hrefs)) : openPlayer(playerArgs.vlc.concat(JSON.stringify(href)))
argv.playlist ? openPlayer(playerArgs.vlc.concat(allHrefs)) : openPlayer(playerArgs.vlc.concat(JSON.stringify(href)))
})

@@ -428,9 +427,9 @@ } else if (argv.iina) {

} else if (argv.mplayer) {
argv.playlist ? openPlayer(playerArgs.mplayer.concat(all_hrefs)) : openPlayer(playerArgs.mplayer.concat(JSON.stringify(href)))
argv.playlist ? openPlayer(playerArgs.mplayer.concat(allHrefs)) : openPlayer(playerArgs.mplayer.concat(JSON.stringify(href)))
} else if (argv.mpv) {
argv.playlist ? openPlayer(playerArgs.mpv.concat(all_hrefs)) : openPlayer(playerArgs.mpv.concat(JSON.stringify(href)))
argv.playlist ? openPlayer(playerArgs.mpv.concat(allHrefs)) : openPlayer(playerArgs.mpv.concat(JSON.stringify(href)))
} else if (argv.omx) {
openPlayer(playerArgs.omx.concat(JSON.stringify(href)))
} else if (argv.smplayer) {
argv.playlist ? openPlayer(playerArgs.smplayer.concat(all_hrefs)) : openPlayer(playerArgs.smplayer.concat(JSON.stringify(href)))
argv.playlist ? openPlayer(playerArgs.smplayer.concat(allHrefs)) : openPlayer(playerArgs.smplayer.concat(JSON.stringify(href)))
}

@@ -784,6 +783,6 @@

if (argv.onExit) {
cp.spawn(argv.onExit[0], argv.onExit.slice(1), { shell: true } )
.on('error', (err) => fatalError(err))
.stderr.on('data', (err) => fatalError(err))
.unref()
cp.spawn(argv.onExit[0], argv.onExit.slice(1), { shell: true })
.on('error', (err) => fatalError(err))
.stderr.on('data', (err) => fatalError(err))
.unref()
}

@@ -790,0 +789,0 @@

{
"name": "webtorrent-cli",
"description": "WebTorrent, the streaming torrent client. For the command line.",
"version": "3.5.0",
"version": "3.5.1",
"author": {

@@ -22,3 +22,2 @@ "name": "WebTorrent LLC",

"ecstatic": "^4.1.4",
"executable": "^4.1.1",
"memory-chunk-store": "^1.3.5",

@@ -25,0 +24,0 @@ "mime": "^2.5.2",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc