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:
parent
db69d9491e
commit
0648d57870
7 changed files with 56 additions and 12 deletions
|
@ -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: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue