소스 검색

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 2 년 전
부모
커밋
41570dc2f9
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  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},