Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working commandline downloads and removing unused code #54

Merged
merged 4 commits into from May 14, 2014
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

fix for invalid torrents passed via commandline

  • Loading branch information
transitive-bullshit committed May 12, 2014
commit 7830df188978c7c6f364c2ebfa4ecae0fa65ff54
@@ -87,7 +87,12 @@ client.on('error', function (err) {
clivas.line('{red:error} ' + err)

This comment has been minimized.

Copy link
@feross

feross May 14, 2014

Member

i think this should have been err.message

})

client.add(torrentId, function (torrent) {
client.add(torrentId, function (err, torrent) {
if (err) {
clivas.line('{red:error} ' + err)
process.exit(1)
}

function updateMetadata () {
if (torrent) {
clivas.clear()
@@ -60,8 +60,8 @@ WebTorrent.prototype.add = function (torrentId, cb) {
// assume it's a filesystem path
fs.readFile(torrentId, function (err, torrent) {
if (err) {
return cb(new Error('Cannot add torrent. Require one of: magnet uri, ' +
'info hash, torrent file, http url, or filesystem path'))
return cb(new Error('Cannot add torrent "' + torrentId + '". Torrent id must be one of: magnet uri, ' +
'info hash, torrent file, http url, or filesystem path.'))
}
onTorrentId(torrent)
})
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.