From 065fc98a87c8570b7bf6cbd599fb2350ab7bce04 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Tue, 17 Jan 2023 16:38:17 -0500 Subject: [PATCH] Fix bug in Jellyfin scrobbling We need to have a default value when we pop off a dictionary, and we need to clear both mopidy and jellyfin status before we look a scrobble up. We may also want simplify status so we don't have mopidy and jellyfin cruft. --- vrobbler/apps/scrobbles/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vrobbler/apps/scrobbles/models.py b/vrobbler/apps/scrobbles/models.py index ef9bf6e..6372e79 100644 --- a/vrobbler/apps/scrobbles/models.py +++ b/vrobbler/apps/scrobbles/models.py @@ -132,7 +132,8 @@ class Scrobble(TimeStampedModel): {"scrobble_data": scrobble_data}, ) # If creating a new scrobble, we don't need status - scrobble_data.pop('mopidy_status') + scrobble_data.pop('mopidy_status', None) + scrobble_data.pop('jellyfin_status', None) return cls.create(scrobble_data) @classmethod