aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/redundancy/video-redundancy.ts
diff options
context:
space:
mode:
authorbuoyantair <buoyantair@protonmail.com>2018-11-16 02:37:16 +0530
committerbuoyantair <buoyantair@protonmail.com>2018-11-16 02:37:16 +0530
commitae28cdf327d782e629379eee1999096ca2a5d74b (patch)
treebfe0d4b3a232d75161fe5bba9196553a388fc02a /server/models/redundancy/video-redundancy.ts
parentd4681c0074ba51c62a3aeb9fb3f2cd071dd21e32 (diff)
parent8cf998733496d44fa564e2e252356b871756c984 (diff)
downloadPeerTube-ae28cdf327d782e629379eee1999096ca2a5d74b.tar.gz
PeerTube-ae28cdf327d782e629379eee1999096ca2a5d74b.tar.zst
PeerTube-ae28cdf327d782e629379eee1999096ca2a5d74b.zip
Merge from upstream
Diffstat (limited to 'server/models/redundancy/video-redundancy.ts')
-rw-r--r--server/models/redundancy/video-redundancy.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts
index cbfc7f7fa..35e0cd3b1 100644
--- a/server/models/redundancy/video-redundancy.ts
+++ b/server/models/redundancy/video-redundancy.ts
@@ -293,6 +293,11 @@ export class VideoRedundancyModel extends Model<VideoRedundancyModel> {
293 } 293 }
294 294
295 return VideoFileModel.sum('size', options as any) // FIXME: typings 295 return VideoFileModel.sum('size', options as any) // FIXME: typings
296 .then(v => {
297 if (!v || isNaN(v)) return 0
298
299 return v
300 })
296 } 301 }
297 302
298 static async listLocalExpired () { 303 static async listLocalExpired () {