Просмотр исходного кода

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.
Colin Powell 2 лет назад
Родитель
Сommit
065fc98a87
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      vrobbler/apps/scrobbles/models.py

+ 2 - 1
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