From: Ian Beckwith Date: Sat, 30 Oct 2010 00:25:58 +0000 (+0100) Subject: add special UNTAGGED tag when no non-special tags present X-Git-Url: http://erislabs.net/gitweb/?p=id3fs.git;a=commitdiff_plain;h=4a96e59e14217427a94a793749e1c20ba114e4ab add special UNTAGGED tag when no non-special tags present --- diff --git a/lib/ID3FS/DB.pm b/lib/ID3FS/DB.pm index 909d7f1..79cd194 100644 --- a/lib/ID3FS/DB.pm +++ b/lib/ID3FS/DB.pm @@ -249,9 +249,16 @@ sub add { "artists_id" => $artist_id, "albums_id" => $albums_id, "paths_id" => $path_id }); - for my $tag (@tags) + if(@tags) { - $self->add_tag($file_id, @$tag); + for my $tag (@tags) + { + $self->add_tag($file_id, @$tag); + } + } + else + { + $self->add_tag($file_id, "UNTAGGED"); } $year="UNKNOWN" unless($self->ok($year));