From 99ad2f797f706e12231537d75eafd47b1fc8293d Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Mon, 22 Apr 2024 12:55:14 -0400 Subject: [PATCH] [scrobbles] Try to fix Jellyfin stop bug --- vrobbler/apps/scrobbles/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vrobbler/apps/scrobbles/models.py b/vrobbler/apps/scrobbles/models.py index 42660de..e0ffe22 100644 --- a/vrobbler/apps/scrobbles/models.py +++ b/vrobbler/apps/scrobbles/models.py @@ -889,14 +889,15 @@ class Scrobble(TimeStampedModel): }, ) + playback_status = scrobble_data.pop( + "mopidy_status", scrobble_data.pop("jellyfin_status", None) + ) if scrobble and ( - scrobble.can_be_updated or mopidy_status == "stopped" + scrobble.can_be_updated or playback_status == "stopped" ): return scrobble.update(scrobble_data) # Discard status before creating - scrobble_data.pop("mopidy_status", None) - scrobble_data.pop("jellyfin_status", None) logger.info( f"[scrobbling] creating new scrobble", extra={