Przeglądaj źródła

Stop location scrobbles properly

Colin Powell 1 rok temu
rodzic
commit
96ca2f5602
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      vrobbler/apps/scrobbles/models.py

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

@@ -703,9 +703,9 @@ class Scrobble(TimeStampedModel):
                         f"No - We've moved, start a new scrobble: {self.media_obj}"
                     )
                     # TODO maybe this should go to `update`?
-                    last = self.previous_all
-                    last.played_to_completion = True
-                    last.save(update_fields=["played_to_completion"])
+                    self.played_to_completion = True
+                    self.stop_timestamp = timezone.now()
+                    self.save(update_fields=["played_to_completion", "stop_timestamp"])
                     updatable = False
         return updatable