merge PathElement::* into Path::Node
[id3fs.git] / lib / ID3FS / PathElement / Tag.pm
index 3464261..3ddb659 100644 (file)
@@ -12,11 +12,13 @@ sub new
 
     $self->{db}=shift;
     $self->{name}=shift;
-    $self->{id}=($self->{db}->id("tags", $self->{name}));
+    $self->{parents_id}=shift;
+    $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;