Fix scrobbing pages

This commit is contained in:
2023-03-27 01:31:05 -04:00
parent d19838a26f
commit ee01ffa4ad
3 changed files with 7 additions and 4 deletions

View File

@ -231,7 +231,7 @@ class Page(TimeStampedModel):
@property
def seconds_to_next_page(self) -> int:
seconds = 0
seconds = 999999 # Effectively infnity time as we have no next
if not self.end_time:
self._set_end_time()
if self.next:
@ -265,7 +265,7 @@ class Page(TimeStampedModel):
def _set_end_time(self) -> None:
if self.end_time:
return self.end_time
return
self.end_time = self.start_time + timedelta(
seconds=self.duration_seconds