package ID3FS::PathElement::Album;

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("albums", $self->{name}));
    return(undef) unless(defined($self->{id}));
    return $self;
}

sub type { return "album"; }

1;
