+++ /dev/null
-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"; }
-sub id { return shift->{id}; }
-1;
+++ /dev/null
-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"; }
-sub id { return shift->{id}; }
-
-1;
+++ /dev/null
-package ID3FS::PathElement::Boolean;
-
-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;
-
- return $self;
-}
-
-sub type { return "boolean"; }
-sub id { return shift->{id}; }
-
-1;
+++ /dev/null
-package ID3FS::PathElement::File;
-
-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("files", $self->{name});
- return(undef) unless(defined($self->{id}));
- return $self;
-}
-
-sub type { return "file"; }
-sub id { return shift->{id}; }
-
-1;
+++ /dev/null
-package ID3FS::PathElement::Tag;
-
-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->{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;
+++ /dev/null
-package ID3FS::PathElement::Tagval;
-
-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("tagvals", $self->{name});
- return(undef) unless(defined($self->{id}));
- return $self;
-}
-
-sub type { return "tagval"; }
-sub id { return shift->{id}; }
-
-1;