[pyddr-devel] Added level sorting to songselect.py

Frank Foeth foeth01 at orange.nl
Thu Jan 18 07:26:35 EST 2007


Oops, the mail program puts nasty linebreaks in the patchfile. I'll try
attaching it this time.

> Hallo,
> 
> I'm new to this list. Please find below a patch for the current
> songselect.py file. It adds a level sorting mode. The goal is to 
> supply the user with a list of folders containing songs that contain
> a dance at the specified level. In the folders the songs are sorted by
> difficulty category (e.g. "BEGINNER", "LIGHT", "BASIC"), and further
> subsorted with grade and rank or bpm. 
> 
> Level sorting is not straightforward, as songs have multiple levels, so 
> it requires some extra code for sorting a folder. Furthermore, level
> sorting is impossible if only one folder is allowed (because of multiple
> dances per song), so level sorting has to be added or removed during
> SongSelect's initialization.
>  
> Known problems in "level" sorting: 
> 1. When changing sortmodes with a song (not a folder) "under the
> selection cursor" and inbetween changing the selected song in a 
> non-level sorted folder, the level folder you eventually end up in is 
> not well defined. I don't see a way to remedy this, but the weird way to
> produce this behaviour probably warrants not many users will file bug
> reports.
> 2. It is currently not possible to automatically return to level mode
> upon restarting the program. This is easily remedied, but requires
> touching another module: constants.py (line 137).
> 3. The use of the SongDisplayItem.info["tmpsortdata"] is ugly, as it
> spill over in to the song's data. It should be remedied by adding a
> parameter to SongDisplayItem (I hope I've got the name right, I'm doing
> typing this part from memory), e.g. SongDisplayItem.level_sort_data =
> "" . 
> 
> The reason I did not do 2. and 3. yet is to limit the patch to one
> file. 
> 
> I'd like some comments. And if it's good enough could Pavel please add
> it to the repository.
> 
> Yours,
> Frank Foeth

-------------- next part --------------
A non-text attachment was scrubbed...
Name: songselect.patch
Type: text/x-patch
Size: 3887 bytes
Desc: not available
URL: <http://icculus.org/pipermail/pyddr-devel/attachments/20070118/2f221df0/attachment.bin>


More information about the pyddr-devel mailing list