id3fs-tag: -V: summarize tags in directories
[id3fs.git] / lib / ID3FS / AudioFile.pm
index e020b43..ffd78d6 100644 (file)
@@ -173,4 +173,27 @@ sub stripslashes
     return $text;
 }
 
+# This location for these subs is pretty much arbitrary
+sub uniq
+{
+    # class method
+    shift if(ref($_[0]) eq "ID3FS::AudioFile");
+    my (@things)=@_;
+    my %hash=();
+    @hash{@things}=();
+    return(sort keys(%hash));
+}
+
+sub list_remove
+{
+    my($remove, $list)=@_;
+    return(()) unless($list && @$list);
+    my @list=@$list;
+    for my $tag (@$remove)
+    {
+       @list=grep { $_ ne $tag; } @list;
+    }
+    return(@list);
+}
+
 1;