Don't take db lives into account for video quota
This commit is contained in:
parent
16b7ad790b
commit
f2dbbf6a96
|
@ -781,12 +781,12 @@ export class UserModel extends Model<Partial<AttributesOnly<UserModel>>> {
|
||||||
`WHERE "account"."userId" = ${options.whereUserId} ${andWhere}`
|
`WHERE "account"."userId" = ${options.whereUserId} ${andWhere}`
|
||||||
|
|
||||||
const webtorrentFiles = 'SELECT "videoFile"."size" AS "size", "video"."id" AS "videoId" FROM "videoFile" ' +
|
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
|
videoChannelJoin
|
||||||
|
|
||||||
const hlsFiles = 'SELECT "videoFile"."size" AS "size", "video"."id" AS "videoId" FROM "videoFile" ' +
|
const hlsFiles = 'SELECT "videoFile"."size" AS "size", "video"."id" AS "videoId" FROM "videoFile" ' +
|
||||||
'INNER JOIN "videoStreamingPlaylist" ON "videoFile"."videoStreamingPlaylistId" = "videoStreamingPlaylist".id ' +
|
'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
|
videoChannelJoin
|
||||||
|
|
||||||
return 'SELECT COALESCE(SUM("size"), 0) AS "total" ' +
|
return 'SELECT COALESCE(SUM("size"), 0) AS "total" ' +
|
||||||
|
|
Loading…
Reference in New Issue
Block a user