sub {
my $result = shift;
- if ( $result->{changed} eq 'database' ) {
+ undef $idler;
+
+ my $changed = $result->{changed} // '';
+
+ if ( $changed eq 'database' ) {
$db_needs_update = 1;
$self->prepare_to_wait_idle;
}
- elsif ( $result->{changed} eq 'playlist' ) {
+ elsif ( $changed eq 'playlist' ) {
$self->queue_songs( undef,
sub { $self->prepare_to_wait_idle } );
}
+ elsif ( $changed eq '' ) {
+ $log->debug("got no changes from idle");
+ $self->prepare_to_wait_idle;
+ }
else {
use JSON;
$log->warn(