We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit e003fb5c authored by Mike Sheldon's avatar Mike Sheldon

Reduce bias towards original artist on similar track radio slightly (but still...

Reduce bias towards original artist on similar track radio slightly (but still make them fairly likely to come up)
parent eaf434d9
......@@ -77,7 +77,7 @@ function make_playlist($session, $old_format=false) {
$artist = new Artist($regs[2]);
$similarArtists = $artist->getSimilar(20);
$artistsClause = 'lower(artist_name) = ' . $adodb->qstr(mb_strtolower($artist->name, 'UTF-8'));
for($i = 0; $i < 4; $i++) {
for($i = 0; $i < 8; $i++) {
$r = rand(0, count($similarArtists) - 1);
$artistsClause .= ' OR lower(artist_name) = ' . $adodb->qstr(mb_strtolower($similarArtists[$r]['artist'], 'UTF-8'));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment