From: Damyan Ivanov Date: Thu, 11 Nov 2021 09:22:15 +0000 (+0000) Subject: fix interval handling when finding suitable songs X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=11aa2a8c927bfae4763ef46b77efd672d56954c3;p=mpd-feeder.git fix interval handling when finding suitable songs --- 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 ) {