[scrobbling] Clean up a few more logs

This commit is contained in:
2024-03-06 17:51:59 -05:00
parent a59997dafb
commit 3b7498c419
2 changed files with 8 additions and 10 deletions

View File

@ -801,6 +801,7 @@ class Scrobble(TimeStampedModel):
"media_id": media.id, "media_id": media.id,
"source": source, "source": source,
"scrobble_data": scrobble_data, "scrobble_data": scrobble_data,
"percent_played": scrobble.percent_played,
}, },
) )
return scrobble.update(scrobble_data) return scrobble.update(scrobble_data)
@ -1003,14 +1004,6 @@ class Scrobble(TimeStampedModel):
def update_ticks(self, data) -> None: def update_ticks(self, data) -> None:
self.playback_position_seconds = data.get("playback_position_seconds") self.playback_position_seconds = data.get("playback_position_seconds")
logger.info(
f"[scrobbling] update ticks",
extra={
"scrobble_id": self.id,
"playback_position_seconds": self.playback_position_seconds,
"source": self.source,
},
)
self.save(update_fields=["playback_position_seconds"]) self.save(update_fields=["playback_position_seconds"])
def finish_long_play(self): def finish_long_play(self):

View File

@ -95,7 +95,8 @@ def check_scrobble_for_finish(
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, locations are ONLY completed when new one is created" f"[scrobbling] not complete, locations are ONLY completed when new one is created, use force_finish",
extra={"scrobble_id": scrobble.id},
) )
return return
@ -119,7 +120,11 @@ def check_scrobble_for_finish(
) )
else: else:
logger.info( logger.info(
f"{scrobble.id} not complete at {scrobble.percent_played}%" f"[scrobbling] not complete",
extra={
"scrobble_id": scrobble.id,
"percent_played": scrobble.percent_played,
},
) )