INNER CODE UNIT · JavaScript

isNotTorrentFile

webtorrent/instant.io · client/index.js:137

function isNotTorrentFile (file) {
  return !isTorrentFile(file)
}

function downloadTorrent (torrentId) {
  const disallowed = DISALLOWED.some(function (infoHash) {
    return torrentId.indexOf(infoHash) >= 0
  })

  if (disallowed) {
    util.log('File not found ' + torrentId)
  } else {
    util.log('Downloading torrent from ' + torrentId)
    getClient(function (err, client) {
      if (err) return util.error(err)
      client.add(torrentId, onTorrent)
    })
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…