From 2e289f3852ca8b623d83c5245b819e3246c84416 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Sat, 14 Mar 2026 02:00:36 -0400 Subject: [PATCH] [scrobbles] source_id is screwing things up --- vrobbler/apps/scrobbles/models.py | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/vrobbler/apps/scrobbles/models.py b/vrobbler/apps/scrobbles/models.py index fa6851e..8c45ea7 100644 --- a/vrobbler/apps/scrobbles/models.py +++ b/vrobbler/apps/scrobbles/models.py @@ -1163,24 +1163,24 @@ class Scrobble(TimeStampedModel): # If source_id is provided (e.g., MediaSourceId from Jellyfin), check for existing scrobble first # This prevents duplicates when webhooks arrive faster than scrobble creation - if source_id: - existing_by_source_id = cls.objects.filter( - media_query, - user_id=user_id, - source_id=source_id, - ).first() - if existing_by_source_id: - logger.info( - "[create_or_update] found existing scrobble by source_id, updating", - extra={ - "scrobble_id": existing_by_source_id.id, - "source_id": source_id, - }, - ) - scrobble_data["playback_status"] = scrobble_data.pop( - "status", None - ) - return existing_by_source_id.update(scrobble_data) + # if source_id: + # existing_by_source_id = cls.objects.filter( + # media_query, + # user_id=user_id, + # source_id=source_id, + # ).first() + # if existing_by_source_id: + # logger.info( + # "[create_or_update] found existing scrobble by source_id, updating", + # extra={ + # "scrobble_id": existing_by_source_id.id, + # "source_id": source_id, + # }, + # ) + # scrobble_data["playback_status"] = scrobble_data.pop( + # "status", None + # ) + # return existing_by_source_id.update(scrobble_data) # Find our last scrobble of this media item (track, video, etc) scrobble = (