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



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]
-- 
http://www.medito.eu.org/vodka

Attachment: DatabaseTrackListModel.cs
Description: Binary data



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