Media player updates
Seek bar, volume bar, updated quota max
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user