commit:b1b5b350f1d604033a3edecfc574dc8745e40194
author:Chip Black
committer:Chip Black
date:Wed Oct 15 22:34:33 2008 -0500
parents:06597fcf0415656ae3430298fbdcf6e4faa0bc4d
Added more checks in db_add
diff --git a/udb.pl b/udb.pl
line changes: +2/-0
index 34a5839..06177e8
--- a/udb.pl
+++ b/udb.pl
@@ -58,6 +58,7 @@ sub blacklisted {
 
 sub db_add {
 	my $file = fullpath(shift);
+	return unless -f $file;
 	return if blacklisted($file);
 	if (-l $file and !-e $file) {
 		print "$file seems to be a broken link.\n";
@@ -74,6 +75,7 @@ sub db_add {
 
 	my $f = Audio::TagLib::FileRef->new($file);
 	return unless $f->file();
+	return unless $f->audioProperties();
 
 	my (%strings, %numeric);
 	if ($f->tag()) {