From 11aa2a8c927bfae4763ef46b77efd672d56954c3 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Thu, 11 Nov 2021 09:22:15 +0000 Subject: [PATCH] fix interval handling when finding suitable songs --- bin/mpd-feeder | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/mpd-feeder b/bin/mpd-feeder index ddc4a92..c6792e8 100755 --- a/bin/mpd-feeder +++ b/bin/mpd-feeder @@ -276,23 +276,23 @@ SQL method db_find_suitable_songs($num) { my @result; - my $sth = $self->db->prepare_cached(<prepare_cached(<execute( - $self->opt->min_song_interval / 3600.0 / 24.0, - $self->opt->min_artist_interval / 3600.0 / 24.0, - $self->opt->min_album_interval / 3600.0 / 24.0, + $self->opt->min_song_interval, + $self->opt->min_artist_interval, + $self->opt->min_album_interval, $num, ); while ( my @row = $sth->fetchrow_array ) { -- 2.39.5