1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Add total video file size column in users list

This commit is contained in:
Chocobozzz 2024-02-21 15:28:38 +01:00
parent db69d9491e
commit 0648d57870
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 56 additions and 12 deletions

View file

@ -198,14 +198,14 @@ async function sendVerifyRegistrationEmail (registration: MRegistration) {
async function getOriginalVideoFileTotalFromUser (user: MUserId) {
const base = await UserModel.getUserQuota({ userId: user.id, daily: false })
return base + LiveQuotaStore.Instance.getLiveQuotaOf(user.id)
return base + LiveQuotaStore.Instance.getLiveQuotaOfUser(user.id)
}
// Returns cumulative size of all video files uploaded in the last 24 hours.
async function getOriginalVideoFileTotalDailyFromUser (user: MUserId) {
const base = await UserModel.getUserQuota({ userId: user.id, daily: true })
return base + LiveQuotaStore.Instance.getLiveQuotaOf(user.id)
return base + LiveQuotaStore.Instance.getLiveQuotaOfUser(user.id)
}
async function isUserQuotaValid (options: {