Explorar el Código

Fix duplicate Jellyfin music scrobbling bug

Solution is identical to what we were already doing with videos.  When
looking for existing scrobbles, don't filter by completion, but just
check if the scrobble was played to completion.  This does create
another irritating situation where old scrobbles from days, months or
even years ago that were not played to completion will be resurrected
and made current here. But that's way less annoying than having spam
scrobbles at the end of every track.
Colin Powell hace 2 años
padre
commit
41570dc2f9
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. 1 2
      vrobbler/apps/scrobbles/models.py

+ 1 - 2
vrobbler/apps/scrobbles/models.py

@@ -133,12 +133,11 @@ class Scrobble(TimeStampedModel):
             cls.objects.filter(
                 track=track,
                 user_id=user_id,
-                played_to_completion=False,
             )
             .order_by('-modified')
             .first()
         )
-        if scrobble:
+        if scrobble and scrobble.percent_played <= 100:
             logger.debug(
                 f"Found existing scrobble for track {track}, updating",
                 {"scrobble_data": scrobble_data},