mirror of https://github.com/Chocobozzz/PeerTube
Fix redundancy too heavy with streaming playlists
parent
0b5c385b45
commit
2fd9737886
|
@ -293,9 +293,8 @@ export class VideosRedundancyScheduler extends AbstractScheduler {
|
||||||
const fileReducer = (previous: number, current: MVideoFile) => previous + current.size
|
const fileReducer = (previous: number, current: MVideoFile) => previous + current.size
|
||||||
|
|
||||||
const totalSize = files.reduce(fileReducer, 0)
|
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) {
|
private async loadAndRefreshVideo (videoUrl: string) {
|
||||||
|
|
Loading…
Reference in New Issue