From c16258ed14ab8a33b17cb8bb1f5de894f8e8a733 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Thu, 31 Jan 2019 14:55:05 +0100 Subject: [PATCH] Removed popularity weight in similar radio, to avoid filter bubbles --- api/funkwhale_api/radios/radios.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/funkwhale_api/radios/radios.py b/api/funkwhale_api/radios/radios.py index 9ccb94e4f..8ca15a026 100644 --- a/api/funkwhale_api/radios/radios.py +++ b/api/funkwhale_api/radios/radios.py @@ -221,7 +221,7 @@ class SimilarRadio(RelatedObjectRadio): next_candidates = [n for n in next_candidates if n[0] in matching_tracks] if not next_candidates: raise NextNotFound() - return weighted_choice(next_candidates) + return random.choice([c[0] for c in next_candidates]) @registry.register(name="artist")