Media player updates

Seek bar, volume bar, updated quota max
This commit is contained in:
2024-03-04 14:33:41 +01:00
parent ac8badc60e
commit 6f4da4046d
6 changed files with 171 additions and 2 deletions
+2
View File
@@ -7,6 +7,7 @@ from django.utils import timezone
from datetime import datetime, timedelta
NOMINATIONS_PER_DAY = 10
MAX_QUOTA = 22
class Background(models.Model):
def __str__(self):
@@ -33,6 +34,7 @@ class Profile(models.Model):
if elapsed.seconds > 300:
noms_per_second = NOMINATIONS_PER_DAY/(60*60*24)
self.quota += noms_per_second * elapsed.seconds
self.quota = min(self.quota, MAX_QUOTA)
print(f"Er zijn {elapsed.seconds}s voorbij, je nieuwe quota is {self.quota}")
self.quota_last_updated = timezone.now()