package ID3FS::PathElement::Artist;

use strict;
use warnings;

sub new
{
    my $proto=shift;
    my $class=ref($proto) || $proto;
    my $self={};
    bless($self,$class);

    $self->{db}=shift;
    $self->{name}=shift;
    $self->{id}=($self->{db}->lookup_id("artists", $self->{name}));
    return(undef) unless(defined($self->{id}));
    return $self;
}

sub type { return "artist"; }

1;
