From 356579f78afb8090bb201a67e982dfec876535aa Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Sat, 9 Dec 2023 23:14:50 +0100 Subject: [PATCH] Fix bug with stopping wrong scrobble --- vrobbler/apps/scrobbles/models.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vrobbler/apps/scrobbles/models.py b/vrobbler/apps/scrobbles/models.py index 0117705..25f03a2 100644 --- a/vrobbler/apps/scrobbles/models.py +++ b/vrobbler/apps/scrobbles/models.py @@ -706,10 +706,8 @@ class Scrobble(TimeStampedModel): logger.info( f"No - We've moved, start a new scrobble: {self.media_obj}" ) - # TODO maybe this should go to `update`? - self.played_to_completion = True - self.stop_timestamp = timezone.now() - self.save(update_fields=["played_to_completion", "stop_timestamp"]) + # Stop the previous location scrobble + self.previous_all.stop() updatable = False return updatable