[Slim-Checkins] r10098 - in /trunk/server: Changelog6.html
Plugins/RandomPlay/Plugin.pm
dsully at svn.slimdevices.com
dsully at svn.slimdevices.com
Fri Sep 29 09:52:38 PDT 2006
Author: dsully
Date: Fri Sep 29 09:52:37 2006
New Revision: 10098
URL: http://svn.slimdevices.com?rev=10098&view=rev
Log:
Bug: 4201
Description: Only add genres to query if there are genres to be selected.
Modified:
trunk/server/Changelog6.html
trunk/server/Plugins/RandomPlay/Plugin.pm
Modified: trunk/server/Changelog6.html
URL: http://svn.slimdevices.com/trunk/server/Changelog6.html?rev=10098&r1=10097&r2=10098&view=diff
==============================================================================
--- trunk/server/Changelog6.html (original)
+++ trunk/server/Changelog6.html Fri Sep 29 09:52:37 2006
@@ -20,6 +20,7 @@
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4189">#4189</a> - mp3 file playback gets truncated</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4191">#4191</a> - Live365 Search has missing strings</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4192">#4192</a> - IE doesn't refresh status</li>
+ <li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4201">#4201</a> - Deselecting all genres in Random Mix creates invalid SQL query, stops SS</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4205">#4205</a> - sleep function with SlimServer 6.5.0 in Fishbone skin, songs longer than 90 minutes</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4221">#4221</a> - 6.5 crashes on artist breadcrumb</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4228">#4228</a> - Fishbone skin status doesn't update from an empty playlist</li>
Modified: trunk/server/Plugins/RandomPlay/Plugin.pm
URL: http://svn.slimdevices.com/trunk/server/Plugins/RandomPlay/Plugin.pm?rev=10098&r1=10097&r2=10098&view=diff
==============================================================================
--- trunk/server/Plugins/RandomPlay/Plugin.pm (original)
+++ trunk/server/Plugins/RandomPlay/Plugin.pm Fri Sep 29 09:52:37 2006
@@ -245,13 +245,16 @@
Slim::Player::Playlist::shuffle($client, 0);
+ my $find = {};
+
# 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);
- my $find = {
- 'genreTracks.genre' => { 'in' => $filteredGenres }
- };
+ if (ref($filteredGenres) eq 'ARRAY' && scalar @$filteredGenres > 0) {
+
+ $find->{'genreTracks.genre'} = { 'in' => $filteredGenres };
+ }
# Prevent items that have already been played from being played again
# This fails when multiple clients are playing random mixes. -- Max
More information about the checkins
mailing list