[Rhythmbox-devel] Auto-rating



Hi,

I finally got Rhythmbox 0.8.1 installed, and I was pretty excited about
finally being able to use the auto-rating feature. I've searched through
the list archives trying to figure out exactly how it's supposed to
work, but there doesn't seem to be anything anywhere that says exactly
how the ratings are supposed to get manipulated.

As near as I can tell, clicking on a song should give it a big rating
boost and skipping a song that's just started should lower its rating by
a decent amount. Allowing a song to play to completion should give it a
minor rating boost. However, after a few hours of playing, a quick grep
of my rhythmdb shows that the only songs that got rated up were those
that I explicitly clicked on. The dozens of songs that played all the
way through still have their original 3.000000 rating. I double-checked
to make sure that I had auto-rating turned on for all of my songs and
that it's turned on globally.

Taking a look at rb_shell_player_auto_adjust_rating in rb-shell-player.c
shows the following weird-looking piece of code:
    entry_play_time = rb_shell_player_get_playing_time (player);
    entry_duration = rb_shell_player_get_playing_song_duration (player);
    entry_time_left = entry_duration - entry_play_time;
    if (entry_time_left <= 0)   <========= Is this right?
        return;
                                                                                                                               
    /* sloppy end of song */
    if (entry_time_left < 16)
        entry_time_left = 0;
                                                                                                                               
    if (entry_time_left == 0) {

I haven't done enough digging through the code to be sure, but in the
context of the other code in that function, and based on my
understanding of how the auto-rating is supposed to work, is that <=
correct? Seems to me that if a song is going to get auto-rated after
playing to completion, that should be a < instead of a <=. I don't have
time right now to figure out what's keeping me from compiling rhythmbox,
so I can't test out my theory on my own right now.

Whether or not that line is a bug, it'd be really nice to know how the
shiny new auto-rating is supposed to work :-). Just let me know if I'm
blind and missed the message that explains everything.

Jacques Fortier




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]