9f5abfdb5e5fa3f4a91508aeb10a33280b6f3102
[id3fs.git] / lib / ID3FS / PathElement / Artist.pm
1 package ID3FS::PathElement::Artist;
2
3 use strict;
4 use warnings;
5
6 sub new
7 {
8     my $proto=shift;
9     my $class=ref($proto) || $proto;
10     my $self={};
11     bless($self,$class);
12
13     $self->{db}=shift;
14     $self->{name}=shift;
15     $self->{id}=($self->{db}->id("artists", $self->{name}));
16     return(undef) unless(defined($self->{id}));
17     print "Artist ID: $self->{id}\n";
18
19     return $self;
20 }
21
22 sub type { return "artist"; }
23
24 1;