Fix how we calcualte resuming a scrobble

This commit is contained in:
2023-01-16 13:43:14 -05:00
parent 0ab7c563cf
commit 0634b94368
6 changed files with 145 additions and 93 deletions

View File

@ -2,6 +2,7 @@ import logging
from typing import Dict
from uuid import uuid4
from django.conf import settings
from django.db import models
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
@ -38,6 +39,9 @@ class Team(TimeStampedModel):
class SportEvent(ScrobblableMixin):
RESUME_LIMIT = getattr(settings, 'SPORT_RESUME_LIMIT', (12 * 60) * 60)
COMPLETION_PERCENT = getattr(settings, 'SPORT_COMPLETION_PERCENT', 90)
class Type(models.TextChoices):
UNKNOWN = 'UK', _('Unknown')
GAME = 'GA', _('Game')