aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/friends.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-13 15:02:51 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-13 15:02:51 +0200
commitd6ea0175cbfc9995c3b2ec23866f7abafa9e3904 (patch)
tree45d0f61c889e29263a1c8c73be24a8f24a790c92 /server/lib/friends.js
parent5109ee61483b46acf7a76be51da7d032afea5b33 (diff)
downloadPeerTube-d6ea0175cbfc9995c3b2ec23866f7abafa9e3904.tar.gz
PeerTube-d6ea0175cbfc9995c3b2ec23866f7abafa9e3904.tar.zst
PeerTube-d6ea0175cbfc9995c3b2ec23866f7abafa9e3904.zip
Fix friends making
Diffstat (limited to 'server/lib/friends.js')
-rw-r--r--server/lib/friends.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/lib/friends.js b/server/lib/friends.js
index f4f2ada87..e052574a5 100644
--- a/server/lib/friends.js
+++ b/server/lib/friends.js
@@ -156,10 +156,12 @@ function computeWinningPods (urls, podsScore) {
156 // Only add a pod if it exists in more than a half base pods 156 // Only add a pod if it exists in more than a half base pods
157 const podsList = [] 157 const podsList = []
158 const baseScore = urls.length / 2 158 const baseScore = urls.length / 2
159 Object.keys(baseScore).forEach(function (pod) { 159 Object.keys(podsScore).forEach(function (pod) {
160 if (podsScore[pod] > baseScore) podsList.push({ url: pod }) 160 if (podsScore[pod] > baseScore) podsList.push({ url: pod })
161 }) 161 })
162 162 console.log(urls)
163 console.log(podsScore)
164 console.log(podsList)
163 return podsList 165 return podsList
164} 166}
165 167