瀏覽代碼

[scrobbles] Add new log on update for scrobble data

Colin Powell 1 年之前
父節點
當前提交
589bf533ea
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      vrobbler/apps/scrobbles/models.py

+ 4 - 0
vrobbler/apps/scrobbles/models.py

@@ -961,6 +961,10 @@ class Scrobble(TimeStampedModel):
         return [s.geo_location for s in past_scrobbles]
 
     def update(self, scrobble_data: dict) -> "Scrobble":
+        logger.info(
+            "[scrobbling] update",
+            extra={"scrobble_id": self.id, "scrobble_data": scrobble_data},
+        )
         # Status is a field we get from Mopidy, which refuses to poll us
         scrobble_status = scrobble_data.pop("mopidy_status", None)
         if not scrobble_status: