Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix redundancy too heavy with streaming playlists

Chocobozzz2fd97378862f
diff --git a/server/lib/schedulers/videos-redundancy-scheduler.ts b/server/lib/schedulers/videos-redundancy-scheduler.ts
index 21fe51156e..d326148d07 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) {