From 296cc4d2e25c106293c5f88ece90500e88f75d38 Mon Sep 17 00:00:00 2001 From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com> Date: Fri, 26 Dec 2025 21:37:39 -0800 Subject: [PATCH] Make #1 ranked versions with avg >= 8.0 heady --- backend/routers/performances.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/routers/performances.py b/backend/routers/performances.py index 89987d9..9cb1a68 100644 --- a/backend/routers/performances.py +++ b/backend/routers/performances.py @@ -145,10 +145,12 @@ def read_performance(slug: str, session: Session = Depends(get_session)): total_versions = len(all_perfs_data) - # Heady = top 20% with at least 1 rating and avg >= 8.0 + # Heady = #1 ranked with avg >= 8.0 OR top 20% with at least 1 rating and avg >= 8.0 is_heady = False if current_rating_count > 0 and current_avg >= 8.0: - if rank and total_versions > 0: + if rank == 1: # Top ranked version always heady if avg >= 8.0 + is_heady = True + elif rank and total_versions > 0: percentile = rank / total_versions is_heady = percentile <= 0.2 # Top 20%