Przeglądaj źródła

Fix wrong ordering for long plays on completion

Colin Powell 1 rok temu
rodzic
commit
88c252eb45
1 zmienionych plików z 1 dodań i 1 usunięć
  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