Comparing version 11.0.9 to 12.0.0
22
index.js
@@ -64,16 +64,8 @@ const WebTorrent = require('webtorrent') | ||
this._readyToGo = false | ||
for await(const parsedData of this.db.values({gt: `${this._fixed.seed}${this._fixed.address}`, lt: `${this._fixed.seed}${this._fixed.infohash}`})){ | ||
try { | ||
await this.saveData(parsedData) | ||
} catch (err) { | ||
console.error(parsedData.address, err) | ||
} | ||
await new Promise((resolve, reject) => setTimeout(resolve, 3000)) | ||
} | ||
for (const torrent of this.webtorrent.torrents) { | ||
if (torrent.address && !torrent.own) { | ||
if (torrent.record) { | ||
try { | ||
await this.saveData(torrent) | ||
await this.saveData(torrent.record) | ||
} catch (err) { | ||
console.error(torrent.address, err) | ||
console.error(torrent.record.address, err) | ||
} | ||
@@ -344,3 +336,4 @@ await new Promise((resolve, reject) => setTimeout(resolve, 3000)) | ||
checkTorrent.own = true | ||
checkTorrent.files.forEach(file => {file.urlPath = file.path.slice(checkTorrent.name.length).replace(/\\/g, '/')}) | ||
checkTorrent.files.forEach(file => { file.urlPath = file.path.slice(checkTorrent.name.length).replace(/\\/g, '/') }) | ||
checkTorrent.record = checkProperty | ||
return this.sendTheTorrent(checkTorrent.address, pathToData, checkTorrent) | ||
@@ -371,3 +364,4 @@ } else { | ||
checkTorrent.dir = null | ||
checkTorrent.files.forEach(file => {file.urlPath = file.path.slice(checkTorrent.name.length).replace(/\\/g, '/')}) | ||
checkTorrent.files.forEach(file => { file.urlPath = file.path.slice(checkTorrent.name.length).replace(/\\/g, '/') }) | ||
checkTorrent.record = checkProperty | ||
return this.sendTheTorrent(checkTorrent.address, pathToData, checkTorrent) | ||
@@ -465,2 +459,4 @@ } | ||
checkTorrent.record = checkProperty | ||
return {secret: !id.provided ? id.secret : null, pair: !id.provided ? id.pair : null, path: pathToData, ...checkProperty, saved} | ||
@@ -467,0 +463,0 @@ } else { |
{ | ||
"name": "torrentz", | ||
"version": "11.0.9", | ||
"version": "12.0.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36784
733