Re: [Banshee-List] Weighed shuffle mode - code proposal and cry for help.



Hi,

On Sun, 2008-05-11 at 16:56 +0000, Elena Grassi wrote:
> Hi all,
> sorry for posting here bad source code...but this is a pre-pre version
> of my proposal for a "weighted shuffle" options.
> Just to give an idea (and ask your help), following Gabriel suggestions,
> I modified the query directly in DatabaseTrackListModel (the .cs
> attached) and added there an internal class with my code for the random
> extractions.
> My doubts/idea/questions are:
> -where this code should be placed (the ShuffleStars class)?
> -when to re-Initialize the weights (at every next random song? I don't
> know how much the db query takes...)
> -will it be better to use this as an Extension or as another shuffle
> mode?
> -the weighted random algorithm per se is ok?
> 
> Sorry for the bad code but I'm a beginner with C# and also a begginer in
> source files longer than 300 lines :)
> 
> Thank you very much for all your work and the opportunity you gave me to
> play around.
> E.
> 
> ps. I did a full checkout against trunk on friday afternoon and modified
> that code [rev. 3911]

I like the idea of having this "biased towards good songs" shuffle mode.

Some remarks :
- You should follow the guidelines in
http://banshee-project.org/Developers/Patches
You just have to open a bug on http://bugzilla.gnome.org

- Make sure to generate the patch file with the following command :
svn diff > descriptive_name_for.patch
It makes it much easier to apply and test.

- Be careful with formatting (see the HACKING file), I think you have
some TAB characters to indent your code.

It's currently not working for me (not going to the next song), but I'm
looking into it and I'll add my findings to the bug once you've created
it.

As for the "architectural" questions, I'll leave them to people who know
what they're talking about... ;)

Have fun !

-- 
Bertrand Lorentz <bertrand lorentz gmail com>
> http://flickr.com/photos/bl8/ <

Attachment: signature.asc
Description: This is a digitally signed message part



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