From 6fc51d929617db23ba455a22281dbe5c56229c6c Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Mon, 30 Jan 2023 23:18:42 -0500 Subject: [PATCH] Fix resurrecting past tracks This may also be hack, but I think that if the playback position ticks are automatically jumped to the run time ticks of the media object, it should stop the resurrection of past scrobbles, because they will be appropriately marked as being 100 played when the scrobble is finished. The only weirdness here is that "in progress" scrobbles will suddenly complete once the media type's threshold is met (90, 95 percent, whatever). But it should be better than overwriting old scrobbles. --- vrobbler/apps/scrobbles/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/vrobbler/apps/scrobbles/utils.py b/vrobbler/apps/scrobbles/utils.py index c7d6498..165b382 100644 --- a/vrobbler/apps/scrobbles/utils.py +++ b/vrobbler/apps/scrobbles/utils.py @@ -77,6 +77,7 @@ def check_scrobble_for_finish( scrobble.in_progress = False scrobble.is_paused = False scrobble.played_to_completion = True + scrobble.playback_position_ticks = scrobble.media_obj.run_time_ticks scrobble.save( update_fields=["in_progress", "is_paused", "played_to_completion"] )