Skip to content

Commit

Permalink
Add some online=1 specifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
klange committed Apr 3, 2012
1 parent 48ef8bb commit 324d390
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Acoustics/Web.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ sub art
my $self = shift;
my $song_id = $self->cgi->param("song_id") || 0;

my @results = $self->acoustics->query('select_songs', {song_id => $song_id});
my @results = $self->acoustics->query('select_songs', {song_id => $song_id, online => 1});

return [],{error => "Song does not exist."} unless @results;

Expand Down Expand Up @@ -1170,7 +1170,7 @@ sub album_search
my $self = shift;
my $album = $self->cgi->param('album') || '';

my $sth = $self->acoustics->db->prepare('SELECT album, song_id FROM songs WHERE album LIKE ? OR artist LIKE ? GROUP BY album');
my $sth = $self->acoustics->db->prepare('SELECT album, song_id FROM songs WHERE album LIKE ? OR artist LIKE ? AND online=1 GROUP BY album');
$sth->execute("%$album%", "%$album%");
my @results = @{$sth->fetchall_arrayref({})};

Expand Down

0 comments on commit 324d390

Please sign in to comment.