]> git.ktnx.net Git - mpd-feeder.git/blobdiff - lib/App/MPD/Feeder/Command.pm
add list-unwanted-artists command
[mpd-feeder.git] / lib / App / MPD / Feeder / Command.pm
index 5c94a756ceef25e26375a6adb9f2a98405147f94..9a425be023bb419fc5952b7fb7fc7c22de0f3492 100644 (file)
@@ -3,6 +3,7 @@ package App::MPD::Feeder::Command;
 use strict;
 use warnings;
 use utf8;
+use feature 'say';
 
 use Log::Any qw($log);
 use Object::Pad;
@@ -54,6 +55,15 @@ isa App::MPD::Feeder {
             return 0;
         }
 
+        if ( $cmd eq 'list-unwanted-artists' ) {
+            die "This command has no arguments\n" if @args;
+            $self->set_db_needs_update(0);
+            my $count = $self->db->walk_unwanted_artists( sub { say @_ } );
+            say "Total unwanted artists: $count";
+
+            return 0;
+        }
+
         if ( $cmd eq 'add-unwanted-album' ) {
             die "NOT IMPLEMENTED\n";
         }