瀏覽代碼

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