aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-30 11:05:27 +0200
committerChocobozzz <me@florianbigard.com>2019-08-30 11:05:27 +0200
commit2fd97378862fe0770775ed1200d671df224e5a36 (patch)
tree8fa6afd0c920e5bddb86cbd05a81ff2c6737b798 /server
parent0b5c385b4529f3bef8f9523de3f9470ffa58f5f5 (diff)
downloadPeerTube-2fd97378862fe0770775ed1200d671df224e5a36.tar.gz
PeerTube-2fd97378862fe0770775ed1200d671df224e5a36.tar.zst
PeerTube-2fd97378862fe0770775ed1200d671df224e5a36.zip
Fix redundancy too heavy with streaming playlists
Diffstat (limited to 'server')
-rw-r--r--server/lib/schedulers/videos-redundancy-scheduler.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/lib/schedulers/videos-redundancy-scheduler.ts b/server/lib/schedulers/videos-redundancy-scheduler.ts
index 21fe51156..d326148d0 100644
--- a/server/lib/schedulers/videos-redundancy-scheduler.ts
+++ b/server/lib/schedulers/videos-redundancy-scheduler.ts
@@ -293,9 +293,8 @@ export class VideosRedundancyScheduler extends AbstractScheduler {
293 const fileReducer = (previous: number, current: MVideoFile) => previous + current.size 293 const fileReducer = (previous: number, current: MVideoFile) => previous + current.size
294 294
295 const totalSize = files.reduce(fileReducer, 0) 295 const totalSize = files.reduce(fileReducer, 0)
296 if (playlists.length === 0) return totalSize
297 296
298 return totalSize * playlists.length 297 return totalSize + (totalSize * playlists.length)
299 } 298 }
300 299
301 private async loadAndRefreshVideo (videoUrl: string) { 300 private async loadAndRefreshVideo (videoUrl: string) {