Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ Client.scrape = (opts, cb) => {

opts.infoHash = Array.isArray(opts.infoHash)
? opts.infoHash.map(infoHash => {
return Buffer.from(infoHash, 'hex')
})
return Buffer.from(infoHash, 'hex')
})
: Buffer.from(opts.infoHash, 'hex')
client.scrape({ infoHash: opts.infoHash })
return client
Expand Down
4 changes: 2 additions & 2 deletions lib/client/http-tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ class HTTPTracker extends Tracker {

const infoHashes = (Array.isArray(opts.infoHash) && opts.infoHash.length > 0)
? opts.infoHash.map(infoHash => {
return infoHash.toString('binary')
})
return infoHash.toString('binary')
})
: (opts.infoHash && opts.infoHash.toString('binary')) || this.client._infoHashBinary
const params = {
info_hash: infoHashes
Expand Down
4 changes: 2 additions & 2 deletions lib/client/websocket-tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ class WebSocketTracker extends Tracker {

const infoHashes = (Array.isArray(opts.infoHash) && opts.infoHash.length > 0)
? opts.infoHash.map(infoHash => {
return infoHash.toString('binary')
})
return infoHash.toString('binary')
})
: (opts.infoHash && opts.infoHash.toString('binary')) || this.client._infoHashBinary
const params = {
action: 'scrape',
Expand Down