From: Damyan Ivanov Date: Thu, 11 Nov 2021 20:04:58 +0000 (+0000) Subject: fix filtering on album last queue time X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=e9d1a8e0c47037748c217b37db55d9ca7576cc2a;p=mpd-feeder.git fix filtering on album last queue time joining on the full PK of albums table avoids multiple matches and erroneous extra results --- diff --git a/bin/mpd-feeder b/bin/mpd-feeder index 42e3f7b..4c2c537 100755 --- a/bin/mpd-feeder +++ b/bin/mpd-feeder @@ -330,11 +330,11 @@ SQL $self->update_db; my @result; - my $sth = $db->prepare_cached(<execute( - $opt->min_song_interval, - $opt->min_artist_interval, - $opt->min_album_interval, - $num, + my @params = ( + $opt->min_song_interval, $opt->min_artist_interval, + $opt->min_album_interval, $num, ); + my $sth = $db->prepare_cached($sql); + $sth->execute(@params); while ( my @row = $sth->fetchrow_array ) { push @result, { song => $row[0], artist => $row[1], album => $row[2] };