aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-03-06 14:49:11 +0100
committerChocobozzz <me@florianbigard.com>2023-03-07 10:18:32 +0100
commitf2dbbf6a969d33464aa9024517c7a2c4a4f35e75 (patch)
treee8137b5694bbb58530dfaa46046ca09f27383236 /server/models
parent16b7ad790b7f10ddb99b08cc1345804cf27ae329 (diff)
downloadPeerTube-f2dbbf6a969d33464aa9024517c7a2c4a4f35e75.tar.gz
PeerTube-f2dbbf6a969d33464aa9024517c7a2c4a4f35e75.tar.zst
PeerTube-f2dbbf6a969d33464aa9024517c7a2c4a4f35e75.zip
Don't take db lives into account for video quota
Diffstat (limited to 'server/models')
-rw-r--r--server/models/user/user.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/user/user.ts b/server/models/user/user.ts
index bfc9b3049..b6b120c92 100644
--- a/server/models/user/user.ts
+++ b/server/models/user/user.ts
@@ -781,12 +781,12 @@ export class UserModel extends Model<Partial<AttributesOnly<UserModel>>> {
781 `WHERE "account"."userId" = ${options.whereUserId} ${andWhere}` 781 `WHERE "account"."userId" = ${options.whereUserId} ${andWhere}`
782 782
783 const webtorrentFiles = 'SELECT "videoFile"."size" AS "size", "video"."id" AS "videoId" FROM "videoFile" ' + 783 const webtorrentFiles = 'SELECT "videoFile"."size" AS "size", "video"."id" AS "videoId" FROM "videoFile" ' +
784 'INNER JOIN "video" ON "videoFile"."videoId" = "video"."id" ' + 784 'INNER JOIN "video" ON "videoFile"."videoId" = "video"."id" AND "video"."isLive" IS FALSE ' +
785 videoChannelJoin 785 videoChannelJoin
786 786
787 const hlsFiles = 'SELECT "videoFile"."size" AS "size", "video"."id" AS "videoId" FROM "videoFile" ' + 787 const hlsFiles = 'SELECT "videoFile"."size" AS "size", "video"."id" AS "videoId" FROM "videoFile" ' +
788 'INNER JOIN "videoStreamingPlaylist" ON "videoFile"."videoStreamingPlaylistId" = "videoStreamingPlaylist".id ' + 788 'INNER JOIN "videoStreamingPlaylist" ON "videoFile"."videoStreamingPlaylistId" = "videoStreamingPlaylist".id ' +
789 'INNER JOIN "video" ON "videoStreamingPlaylist"."videoId" = "video"."id" ' + 789 'INNER JOIN "video" ON "videoStreamingPlaylist"."videoId" = "video"."id" AND "video"."isLive" IS FALSE ' +
790 videoChannelJoin 790 videoChannelJoin
791 791
792 return 'SELECT COALESCE(SUM("size"), 0) AS "total" ' + 792 return 'SELECT COALESCE(SUM("size"), 0) AS "total" ' +