From: Chocobozzz Date: Fri, 30 Aug 2019 09:05:27 +0000 (+0200) Subject: Fix redundancy too heavy with streaming playlists X-Git-Tag: v2.0.0-rc.1~97 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2fd97378862fe0770775ed1200d671df224e5a36;p=oweals%2Fpeertube.git Fix redundancy too heavy with streaming playlists --- 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 { const fileReducer = (previous: number, current: MVideoFile) => previous + current.size const totalSize = files.reduce(fileReducer, 0) - if (playlists.length === 0) return totalSize - return totalSize * playlists.length + return totalSize + (totalSize * playlists.length) } private async loadAndRefreshVideo (videoUrl: string) {