[scrobbles] Refactor run time sec to be blank by default

This commit is contained in:
2025-10-29 21:54:18 -04:00
parent 082979bea6
commit a474b5df48
21 changed files with 467 additions and 6 deletions

View File

@ -57,14 +57,20 @@ class ScrobblableMixin(TimeStampedModel):
uuid = models.UUIDField(default=uuid4, editable=False, **BNULL)
title = models.CharField(max_length=255, **BNULL)
run_time_seconds = models.IntegerField(default=900)
run_time_ticks = models.PositiveBigIntegerField(**BNULL)
base_run_time_seconds = models.IntegerField(**BNULL)
genre = TaggableManager(through=ObjectWithGenres, blank=True)
class Meta:
abstract = True
@property
def run_time_seconds(self) -> int:
run_time = 900
if self.base_run_time_seconds:
run_time = self.base_run_time_seconds
return run_time
@classmethod
def is_long_play_media(cls) -> bool:
return False