From f2dbbf6a969d33464aa9024517c7a2c4a4f35e75 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 6 Mar 2023 14:49:11 +0100 Subject: [PATCH] Don't take db lives into account for video quota --- server/models/user/user.ts | 4 ++-- 1 file 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>> { `WHERE "account"."userId" = ${options.whereUserId} ${andWhere}` const webtorrentFiles = 'SELECT "videoFile"."size" AS "size", "video"."id" AS "videoId" FROM "videoFile" ' + - 'INNER JOIN "video" ON "videoFile"."videoId" = "video"."id" ' + + 'INNER JOIN "video" ON "videoFile"."videoId" = "video"."id" AND "video"."isLive" IS FALSE ' + videoChannelJoin const hlsFiles = 'SELECT "videoFile"."size" AS "size", "video"."id" AS "videoId" FROM "videoFile" ' + 'INNER JOIN "videoStreamingPlaylist" ON "videoFile"."videoStreamingPlaylistId" = "videoStreamingPlaylist".id ' + - 'INNER JOIN "video" ON "videoStreamingPlaylist"."videoId" = "video"."id" ' + + 'INNER JOIN "video" ON "videoStreamingPlaylist"."videoId" = "video"."id" AND "video"."isLive" IS FALSE ' + videoChannelJoin return 'SELECT COALESCE(SUM("size"), 0) AS "total" ' +