Skip to content

Commit

Permalink
Disallow pools from containing banned tracks.
Browse files Browse the repository at this point in the history
  • Loading branch information
martindale committed Nov 19, 2015
1 parent 6ae28eb commit 1610c8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions models/Room.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ RoomSchema.methods.generatePool = function( gain , failpoint , cb ) {
query._curator = { $exists: true };
// must have been played in this room
query._room = room._id;
// must not be banned
query._track = { $nin: room.bans._tracks };

// TEMPORARY PERFORMANCE FIX
return Play.find(query).limit( 4096 ).sort('timestamp').exec(function(err, plays) {
Expand Down

0 comments on commit 1610c8e

Please sign in to comment.