[scrobbles] Refactor run time sec to be blank by default
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user