1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Fix total videos stats

This commit is contained in:
Chocobozzz 2020-03-13 13:43:26 +01:00
parent 8c966daab3
commit baab47ca81
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 30 additions and 7 deletions

View file

@ -26,11 +26,12 @@ async function getStats (req: express.Request, res: express.Response) {
const { totalInstanceFollowers, totalInstanceFollowing } = await ActorFollowModel.getStats()
const { totalLocalVideoFilesSize } = await VideoFileModel.getStats()
const strategies: { strategy: VideoRedundancyStrategyWithManual, size: number }[] = CONFIG.REDUNDANCY.VIDEOS.STRATEGIES
.map(r => ({
strategy: r.strategy,
size: r.size
}))
const strategies = CONFIG.REDUNDANCY.VIDEOS.STRATEGIES
.map(r => ({
strategy: r.strategy as VideoRedundancyStrategyWithManual,
size: r.size
}))
strategies.push({ strategy: 'manual', size: null })
const videosRedundancyStats = await Promise.all(