Re: [Rhythmbox-devel] Improved random patch (bug 163196 ish)

* Alexander Senger (neutronenspalter freenet de) wrote:
> Hi,
> that's funny. I've investigated the same thing, though without getting so far as to submit a patch.
> Especially I was interested in lowering the probability of very recent songs being replayed.

I think lots of people have; there are actually a few bugs in the database
with similar problems.

> In the course I noted, that the "history" of a song isn't updated before the next song is played,
> but after the next but one (in the SVN-checkout of rhythmbox 0.11.6). Let's give me an example: song
> A is played and was never played before (rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_LAST_PLAYED)
> returns 0). When the function "rb_random_by_age_and_rating_get_entry_weight" is called in the
> process to select the next song, the query "rhythmdb_entry_get_ulong (entry,
> RHYTHMDB_PROP_LAST_PLAYED)" for song A returns 0 again! Only after the next song you get the correct
> result. A reason might be, that the next (random) song is choosen before the database is updated,
> but I never checked for this.
> This behaviour makes it rather pointless to try to avoid a song being played twice in a row in
> random play. I always wanted to improve on that but couldn't find the time to learn the principles
> of bookkeeping in rhythmbox. Maybe someone could give a hint?

Look back on the list a few weeks; I remember there was someone who was discussing this
or had a patch; they were considering doing it at some point into the song (e.g. 2/3rds of the
(Having said that, last song repeats seem to be very rare, if it's happening as you say
why would that be?)

> Anyway: I think the patch of Alan is a great idea. I would like to have something like this in
> rhythmbox.
> @ Alan: I have a little setup here for testing the "randomness" of songs being played which gives
> nice little graphs as output (sweet ;) ). If you like I could run it with your patch applied. Please
> give me a note if this is of any help.

Oh yes, graphs are always good - of course with the biases in there it shouldn't
actually be truly random - it should be nicely skewed.


 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    | Running GNU/Linux on Alpha,68K| Happy  \ 
\ gro.gilbert @ | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex /
 \ _________________________|_____   |_______/

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