use strict;
use warnings;
+use ID3FS::AudioFile;
use MP3::Tag;
use MP3::Info;
my($self, @tags)=@_;
my $existing=$self->tags();
my @existing=split(/\s*,\s*/, $existing) if($existing);
- my @merged=$self->uniq(@tags, @existing);
+ my @merged=ID3FS::AudioFile::uniq(@tags, @existing);
my $genre=join(', ', @merged);
return($self->set("genre", $genre));
}
{
my($self, $tags, $delvals)=@_;
my $current=$self->tags();
- my @current=split(/\s*,\s*/, $current);
+ my @current=();
+ @current=split(/\s*,\s*/, $current) if($current);
my @tags=split(/\s*,\s*/, $tags);
my %hash=();
@hash{@current}=();
}
}
-sub uniq
-{
- my ($self, @things)=@_;
- my %hash=();
- @hash{@things}=();
- return(sort keys(%hash));
-}
sub channels
{