[Slim-Checkins] r10104 -
/branches/6.5/server/Plugins/RandomPlay/Plugin.pm
dsully at svn.slimdevices.com
dsully at svn.slimdevices.com
Fri Sep 29 14:20:41 PDT 2006
Author: dsully
Date: Fri Sep 29 14:20:40 2006
New Revision: 10104
URL: http://svn.slimdevices.com?rev=10104&view=rev
Log:
Bug: N/A
Description: Merge from trunk -r 10102:10103
Modified:
branches/6.5/server/Plugins/RandomPlay/Plugin.pm
Modified: branches/6.5/server/Plugins/RandomPlay/Plugin.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Plugins/RandomPlay/Plugin.pm?rev=10104&r1=10103&r2=10104&view=diff
==============================================================================
--- branches/6.5/server/Plugins/RandomPlay/Plugin.pm (original)
+++ branches/6.5/server/Plugins/RandomPlay/Plugin.pm Fri Sep 29 14:20:40 2006
@@ -282,8 +282,12 @@
# Initialize find to only include user's selected genres. If they've deselected
# all genres, this clause will be ignored by find, so all genres will be used.
my $filteredGenres = getFilteredGenres($client);
-
- if (ref($filteredGenres) eq 'ARRAY' && scalar @$filteredGenres > 0) {
+ my $excludedGenres = getFilteredGenres($client, 1);
+
+ # Only look for genre tracks if we have some, but not all
+ # genres selected. Or no genres selected.
+ if ((scalar @$filteredGenres > 0 && scalar @$excludedGenres != 0) ||
+ scalar @$filteredGenres != 0 && scalar @$excludedGenres > 0) {
$find->{'genreTracks.genre'} = { 'in' => $filteredGenres };
}
More information about the checkins
mailing list