aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/schedulers
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/schedulers')
-rw-r--r--server/lib/schedulers/videos-redundancy-scheduler.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/lib/schedulers/videos-redundancy-scheduler.ts b/server/lib/schedulers/videos-redundancy-scheduler.ts
index 01af1e9d2..90caed96d 100644
--- a/server/lib/schedulers/videos-redundancy-scheduler.ts
+++ b/server/lib/schedulers/videos-redundancy-scheduler.ts
@@ -269,7 +269,10 @@ export class VideosRedundancyScheduler extends AbstractScheduler {
269 private getTotalFileSizes (files: VideoFileModel[], playlists: VideoStreamingPlaylistModel[]) { 269 private getTotalFileSizes (files: VideoFileModel[], playlists: VideoStreamingPlaylistModel[]) {
270 const fileReducer = (previous: number, current: VideoFileModel) => previous + current.size 270 const fileReducer = (previous: number, current: VideoFileModel) => previous + current.size
271 271
272 return files.reduce(fileReducer, 0) * playlists.length 272 const totalSize = files.reduce(fileReducer, 0)
273 if (playlists.length === 0) return totalSize
274
275 return totalSize * playlists.length
273 } 276 }
274 277
275 private async loadAndRefreshVideo (videoUrl: string) { 278 private async loadAndRefreshVideo (videoUrl: string) {