From e9d1a8e0c47037748c217b37db55d9ca7576cc2a Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Thu, 11 Nov 2021 20:04:58 +0000 Subject: [PATCH] fix filtering on album last queue time joining on the full PK of albums table avoids multiple matches and erroneous extra results --- bin/mpd-feeder | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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] }; -- 2.39.5