Fix redundancy too heavy with streaming playlists

This commit is contained in:
Chocobozzz 2019-08-30 11:05:27 +02:00
parent 0b5c385b45
commit 2fd9737886
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 2 deletions

View File

@ -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) {