Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jovuit
funkwhale_OLD
Commits
c16258ed
Verified
Commit
c16258ed
authored
Jan 31, 2019
by
Eliot Berriot
Browse files
Removed popularity weight in similar radio, to avoid filter bubbles
parent
e6a5f69f
Changes
1
Hide whitespace changes
Inline
Side-by-side
api/funkwhale_api/radios/radios.py
View file @
c16258ed
...
...
@@ -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"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment