[scrobbling] Sometimes we wont have timestamps
This commit is contained in:
@ -558,7 +558,8 @@ class Scrobble(TimeStampedModel):
|
|||||||
self.uuid = uuid4()
|
self.uuid = uuid4()
|
||||||
|
|
||||||
# Microseconds mess up Django's filtering, and we don't need be that specific
|
# Microseconds mess up Django's filtering, and we don't need be that specific
|
||||||
self.timestamp = self.timestamp.replace(microsecond=0)
|
if self.timestamp:
|
||||||
|
self.timestamp = self.timestamp.replace(microsecond=0)
|
||||||
self.media_type = self.MediaType(self.media_obj.__class__.__name__)
|
self.media_type = self.MediaType(self.media_obj.__class__.__name__)
|
||||||
|
|
||||||
return super(Scrobble, self).save(*args, **kwargs)
|
return super(Scrobble, self).save(*args, **kwargs)
|
||||||
|
|||||||
@ -92,9 +92,10 @@ def check_scrobble_for_finish(
|
|||||||
scrobble: "Scrobble", force_to_100=False, force_finish=False
|
scrobble: "Scrobble", force_to_100=False, force_finish=False
|
||||||
) -> None:
|
) -> None:
|
||||||
completion_percent = scrobble.media_obj.COMPLETION_PERCENT
|
completion_percent = scrobble.media_obj.COMPLETION_PERCENT
|
||||||
|
|
||||||
if scrobble.media_type == "GeoLocation" and not force_finish:
|
if scrobble.media_type == "GeoLocation" and not force_finish:
|
||||||
logger.info(
|
logger.info(
|
||||||
f"{scrobble.id} not complete, GeoLocs are completed when new one is created"
|
f"{scrobble.id} not complete, locations are ONLY completed when new one is created"
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user