[Slim-Checkins] r8855 - /trunk/server/Plugins/RandomPlay/Plugin.pm
dsully at svn.slimdevices.com
dsully at svn.slimdevices.com
Mon Aug 7 18:46:03 PDT 2006
Author: dsully
Date: Mon Aug 7 18:46:02 2006
New Revision: 8855
URL: http://svn.slimdevices.com?rev=8855&view=rev
Log:
Bug: 2551
Description; DBIx::Class (on top of SQL::Abstract) easily let's us use ORs
Modified:
trunk/server/Plugins/RandomPlay/Plugin.pm
Modified: trunk/server/Plugins/RandomPlay/Plugin.pm
URL: http://svn.slimdevices.com/trunk/server/Plugins/RandomPlay/Plugin.pm?rev=8855&r1=8854&r2=8855&view=diff
==============================================================================
--- trunk/server/Plugins/RandomPlay/Plugin.pm (original)
+++ trunk/server/Plugins/RandomPlay/Plugin.pm Mon Aug 7 18:46:02 2006
@@ -254,13 +254,14 @@
};
# Prevent items that have already been played from being played again
- # Following doesn't work as it excludes tracks that haven't
- # ever been played. Need to be able to say NULL OR < startTime
- # Additionally, this fails when multiple clients are playing
- # random mixes. -- Max
- #if ($mixInfo{$client->id}->{'startTime'}) {
- # $find->{'lastPlayed'} = {'<' => $mixInfo{$client->id}->{'startTime'}};
- #}
+ # This fails when multiple clients are playing random mixes. -- Max
+ if ($mixInfo{$client->id}->{'startTime'}) {
+
+ $find->{'lastPlayed'} = [
+ { '=' => undef },
+ { '<' => $mixInfo{$client->id}->{'startTime'} }
+ ];
+ }
if ($type eq 'track' || $type eq 'year') {
More information about the checkins
mailing list