elsif($state==$STATE_TAG || $state==$STATE_TAGVAL)
{
if($state==$STATE_TAG && $self->at("tag") &&
- $self->{db}->tag_has_values($self->tail()->{id}))
+ $self->{db}->tag_has_values($self->tail()->id()))
{
@dents=$self->tags();
}
my $tag=$self->tail();
# print "SM: TAG/TAGVAL($state): $name\n";
if($state==$STATE_TAG && $self->is("tag", $tag) &&
- $self->{db}->tag_has_values($tag->{id}))
+ $self->{db}->tag_has_values($tag->id()))
{
-# print "Parsing: parent: $tag->{id}\n";
- my $tagval=ID3FS::PathElement::Tag->new($self->{db}, $name, $tag->{id});
+# print "Parsing: parent: $tag->id()\n";
+ my $tagval=ID3FS::PathElement::Tag->new($self->{db}, $name, $tag->id());
if(defined($tagval))
{
$self->state($STATE_TAGVAL);
if($self->is("tag", $thing))
{
# Handle tag values by dropping parent
- if(@input && $self->is("tag", $input[0])
+ if(@input && $self->is("tag", $input[0]))
{
$thing=shift @input;
}
my $tail=$self->tail();
if($self->is("tag", $tail))
{
- return($self->{db}->tag_has_values($tail->{id}));
+ return($self->{db}->tag_has_values($tail->id()));
}
}
my $tail=$self->tail();
if($self->is("tag", $tail))
{
- return($tail->{id});
+ return($tail->id());
}
return undef;
}
# FIXME: rework PathElements
if($self->is("artist", $tail))
{
- return $self->artist_albums($tail->{id});
+ return $self->artist_albums($tail->id());
}
my $sql=$self->sql_start("albums.name");
$sql .= ("INNER JOIN albums ON files.albums_id=albums.id\n" .
my $tail=$self->tail();
if($self->is("artist", $tail))
{
- return $self->artist_tracks($tail->{id});
+ return $self->artist_tracks($tail->id());
}
elsif($self->is("album", $tail))
{
if($self->is("artist", $artist))
{
# should always happen
- $artist_id=$artist->{id};
+ $artist_id=$artist->id();
}
- return $self->album_tracks($artist_id, $tail->{id});
+ return $self->album_tracks($artist_id, $tail->id());
}
my $sql=$self->sql_start("files.name");
$sql .= "INNER JOIN artists ON files.artists_id=artists.id\n";
my $tail=$self->tail();
if($self->is("file", $tail))
{
- my $id=$tail->{id};
+ my $id=$tail->id();
my $sql=("SELECT paths.name, files.name FROM files\n" .
"INNER JOIN paths ON files.paths_id=paths.id\n" .
"WHERE files.id=?\n" .
"\t\tWHERE ");
if(scalar(@tags) > 1)
{
- $sql .= ("(t1.parents_id='" . $tags[0]->{id} . "' AND t1.id='" .
- $tags[1]->{id} . "')");
+ $sql .= ("(t1.parents_id='" . $tags[0]->id() . "' AND t1.id='" .
+ $tags[1]->id() . "')");
}
else
{
- $sql .= ("(t1.parents_id='' AND t1.id='" . $tags[0]->{id} . "')");
+ $sql .= ("(t1.parents_id='' AND t1.id='" . $tags[0]->id() . "')");
}
$sql .= "\n\t\tGROUP BY fxt1.files_id\n\t)\n";
return($sql);
if(defined($lasttag))
{
# print "TAGVAL\n";
- push(@tags_vals, [$lasttag, $constraint->{id}]) if defined($constraint->{id});
+ push(@tags_vals, [$lasttag, $constraint->id()]) if defined($constraint->id());
$lasttag=undef;
}
- elsif($self->tag_has_values($constraint->{id}))
+ elsif($self->tag_has_values($constraint->id()))
{
# print "HASVALUES\n";
- $lasttag=$constraint->{id} if defined($constraint->{id});
+ $lasttag=$constraint->id() if defined($constraint->id());
}
else
{
# print "NOVALUES\n";
- push(@tags, $constraint->{id}) if(defined($constraint->{id}));
+ push(@tags, $constraint->id()) if(defined($constraint->id()));
}
}
}