Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix quota calculation

Chocobozzz95a010b6c421
diff --git a/client/src/app/+admin/shared/user-real-quota-info.component.html b/client/src/app/+admin/shared/user-real-quota-info.component.html
index 3f9e11f1cf..4e17892397 100644
--- a/client/src/app/+admin/shared/user-real-quota-info.component.html
+++ b/client/src/app/+admin/shared/user-real-quota-info.component.html
@@ -8,7 +8,7 @@
@if (isTranscodingInformationDisplayed()) {
<ng-container i18n>
- Transcoding is enabled so videos size can be at most ~ {{ computeQuotaWithTranscoding() | bytes: 0 }}.
+ Transcoding is enabled so real videos size can be at most ~ {{ computeQuotaWithTranscoding() | bytes: 0 }}.
</ng-container>
}
</div>
diff --git a/client/src/app/+admin/shared/user-real-quota-info.component.ts b/client/src/app/+admin/shared/user-real-quota-info.component.ts
index 979558bbb4..b3df9ed510 100644
--- a/client/src/app/+admin/shared/user-real-quota-info.component.ts
+++ b/client/src/app/+admin/shared/user-real-quota-info.component.ts
@@ -28,7 +28,7 @@ export class UserRealQuotaInfoComponent implements OnInit {
const resolutions = transcodingConfig.enabledResolutions
const higherResolution = VideoResolution.H_4K
- let multiplier = 0
+ let multiplier = 1
for (const resolution of resolutions) {
multiplier += resolution / higherResolution
@@ -36,7 +36,7 @@ export class UserRealQuotaInfoComponent implements OnInit {
if (transcodingConfig.hls.enabled) multiplier *= 2
- return multiplier * this.getQuotaAsNumber()
+ return Math.round(multiplier * this.getQuotaAsNumber())
}
getQuotaAsNumber () {