merge PathElement::* into Path::Node
[id3fs.git] / lib / ID3FS / PathElement / Tag.pm
index 3185955..3ddb659 100644 (file)
@@ -13,11 +13,12 @@ sub new
     $self->{db}=shift;
     $self->{name}=shift;
     $self->{parents_id}=shift;
-    $self->{id}=$self->{db}->id("tags", $self->{name});
+    $self->{id}=$self->{db}->lookup_id("tags", $self->{name}, $self->{parents_id});
     return(undef) unless(defined($self->{id}));
     return($self);
 }
 
 sub type { return "tag"; }
+sub id { return shift->{id}; }
 
 1;