Skip to content

Commit

Permalink
Fix missing trackerData
Browse files Browse the repository at this point in the history
  • Loading branch information
phillmac committed May 21, 2021
1 parent 8d74cee commit 2780127
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/scrape-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ module.exports = function (redisClient, lock, debugVerbose = false) {
wasStale = true

const trackerResults = await scrapeTrackers(torrent._id, staleTrackers)
torrent.trackerData = Object.assign({}, torrent.trackerData, trackerResults)
if (!trackerData) {
torrent.trackerData = trackerResults
} else {
torrent.trackerData = Object.assign(torrent.trackerData, trackerResults)
}

const sucessfullTrackers = Object.keys(trackerResults)
const missingTrackers = staleTrackers.filter(t => !sucessfullTrackers.includes(t))
Expand Down

0 comments on commit 2780127

Please sign in to comment.