Bugzilla – Bug 4309
Sort genres by name in Random Mix
Last modified: 2008-12-18 11:11:39 UTC
Ideally sorted within the two columns, but that's less important than just getting them into an order that makes finding things easier.
Created attachment 1623 [details] allow sort by genre name ok, couple of items that make this work. First, %genres is now keyed by name. This is all that is needed, but there are added benefits aside from sorting. We save the disabled genres by name, which means they can persist across scans. the current method stores id's that can change. Also, the name keys mean that the param matching needed to change a bit. Iterating through the %genres hash means less iterations than currently where we are iterating through the entire params hash. yikers.
Kevin, that's perfect. Except that I'm getting inverted checkbox behavior. If I 'Select All' and then Save, when the page is reloaded, no checks appear. If I check only 'Blues' and 'Rock', then when the page reloads after a Save, everything except those two are checked off.
Actually, the patch breaks things pretty good. I just noticed that nothing is added to the playlist when doing a Play or Add Random songs, artists, or albums. Random years crashes: Can't call method "year" on an undefined value at C:\Program Files\SlimServer\server/Plugins/RandomPlay/Plugin.pm line 207.
seems I got caught on my own caching. simple inversion there, but I need to check out the filtering before another rev.
no worries, testing and tackling a list as we speek
Created attachment 1624 [details] handle lists. ok, this fixes the player genre list, the inverted web form, the checkbox overlay is upgraded to the current style, and fixes a bunch of undef warnings from INPUT.Choice caused by current svn. the years crash is probably due to the filterGenres function being mixed up after swapping name/id. it now seems to be fine.
That looks very good. Something I'm noticing, maybe unrelated to the patch, is that a change of player in the status pane has no effect within Random Mix. To duplicate: Go into Random Mix, change the player, then play Random songs or whatever and it plays to the orginally selected player.
right, I expect the player change script isn't making the right changes to teh random mix page. After working with it last night, it's clear now that it doesn't really fit in with the way other pages work. easy fix, however.
filed the refresh problem as bug 4317, and it shoudl now be fixed. leaving sorting out as this is currently set as an enhancement and i believe things are too close to 6.5.1 release to be worrying about a rework of this type. of course, the patch is ready should it be desired for 6.5.1. but that's Chris/Dean/Dan's call.
Maybe check it in to the trunk?
I'll commit in a few days once 6.5 merges are not an issue, unless this is decided as worthwhiel merging.
Targeting for 7.0
in trunk at change 10273. reopen if problems come up.
merged to 6.5.1 at change 10383