64
64
rb_random_by_age_and_rating_get_entry_weight (RBRandomPlayOrder *rorder, RhythmDB *db, RhythmDBEntry *entry)
71
71
/* This finds the log of the number of seconds since the last play.
72
72
* It handles never played automatically, since now-0 is a valid
76
76
seconds_since_last_play = now - last_play;
77
77
/* The lowest weight should be 0. */
78
78
if (seconds_since_last_play < 1)
79
79
seconds_since_last_play = 1;
86
87
return log (seconds_since_last_play) * (rating + 1.0);