From 4a96e59e14217427a94a793749e1c20ba114e4ab Mon Sep 17 00:00:00 2001 From: Ian Beckwith Date: Sat, 30 Oct 2010 01:25:58 +0100 Subject: [PATCH] add special UNTAGGED tag when no non-special tags present --- lib/ID3FS/DB.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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)); -- 2.11.0