use App::MPD::Feeder::DB;
use App::MPD::Feeder::Options;
-use App::MPD::Feeder::WorkQueue;
use DBD::Pg;
use DBI;
use Getopt::Long;
$new_songs, $new_artists, $new_albums
) = $self->db->finish_update;
- $log->info(
+ $log->notice(
"Updated data about $song_count songs (including $new_songs new), "
. "$total_artists artists (including $new_artists new) "
my $present = $mpd->send('playlist')->get // [];
$present = scalar(@$present);
- $log->notice( "Playlist contains $present songs. Wanted: "
- . $opt->target_queue_length );
if ( $present < $opt->target_queue_length ) {
+ $log->notice( "Playlist contains $present songs. Wanted: "
+ . $opt->target_queue_length );
$self->queue_songs( $opt->target_queue_length - $present );
}
else {
+ $log->info("Playlist contains $present songs");
$playlist_needs_filling = 0;
}
);
}
- $log->info("About to add $num songs to the playlist");
+ $log->debug("About to add $num songs to the playlist");
my @paths;
for my $song (@list) {
push @paths, $path;
}
- $log->debug( "Adding " . join( ', ', map {"«$_»"} @paths ) );
+ $log->notice( "Adding " . join( ', ', map {"«$_»"} @paths ) );
# MPD needs raw bytes
utf8::encode($_) for @paths;
}
method reexec {
- $log->notice("disconnecting and re-starting");
+ $log->info("disconnecting and re-starting");
$db->disconnect;
undef $mpd;