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.
This commit is contained in:
@ -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},
|
||||
|
||||
Reference in New Issue
Block a user