From 88c252eb45ac921b4dea23810f656c0c0f4298c0 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Sun, 26 Nov 2023 11:09:09 +0100 Subject: [PATCH] Fix wrong ordering for long plays on completion --- vrobbler/apps/scrobbles/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vrobbler/apps/scrobbles/utils.py b/vrobbler/apps/scrobbles/utils.py index 97c6023..e0fee46 100644 --- a/vrobbler/apps/scrobbles/utils.py +++ b/vrobbler/apps/scrobbles/utils.py @@ -184,7 +184,7 @@ def get_long_plays_completed(user: User) -> list: for media in media_obj.objects.all(): if ( media.scrobble_set.all() - and media.scrobble_set.filter(user=user) + and media.scrobble_set.filter(user=user).order_by("timestamp") .last() .long_play_complete == True