Quellcode durchsuchen

Fix wrong ordering for long plays on completion

Colin Powell vor 1 Jahr
Ursprung
Commit
88c252eb45
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      vrobbler/apps/scrobbles/utils.py

+ 1 - 1
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