فهرست منبع

Fix issue with GPS scrobbles being always in progress

Colin Powell 1 سال پیش
والد
کامیت
bbaa8fa078
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      vrobbler/apps/scrobbles/models.py

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

@@ -643,6 +643,9 @@ class Scrobble(TimeStampedModel):
                     updatable = True
                 else:
                     logger.info("No - We've moved, start a new scrobble")
+                    # TODO maybe this should go to `update`?
+                    self.previous.played_to_completion = True
+                    self.previous.save(update_fields=["played_to_completion"])
                     updatable = False
         return updatable