only complain about missing albums if $verbose, complain about artists always
[id3fs.git] / lib / ID3FS / AudioFile / Mp3.pm
index 8ac84c4..d4faf09 100644 (file)
@@ -26,7 +26,7 @@ sub new
 
 sub choose
 {
-    my ($self, $func, $verbose)=@_;
+    my ($self, $func)=@_;
     my $thing=undef;
     if(defined($self->{v2}))
     {
@@ -36,20 +36,15 @@ sub choose
     {
        $thing=$self->{v1}->$func();
     }
-    if(!defined($thing) || !length($thing))
-    {
-       warn("$self->{path}: no $func defined in ID3 tags\n") if($verbose);
-       return undef;
-    }
     return $thing;
 }
 
-sub artist    { shift->choose("artist", 1); }
-sub album     { shift->choose("album", 1);  }
+sub artist    { shift->choose("artist"); }
+sub album     { shift->choose("album");  }
 # We don't care if year is not set
-sub year      { shift->choose("year", 0);   }
-sub audiotype { return "mp3";               }
-sub haspic    { return undef;               } # FIXME
+sub year      { shift->choose("year");   }
+sub audiotype { return "mp3";            }
+sub haspic    { return undef;            } # FIXME
 sub v1genre
 {
     my($self)=@_;