sub artist_tracks
{
- my($self, $artist_id)=@_;
- my $sql=("SELECT files.name FROM files\n\t" .
+ my($self, $artist_id, @constraints)=@_;
+ my $sql=("SELECT files.name FROM (\n" .
+ $self->tags_subselect(@constraints) .
+ "\t) AS subselect\n" .
+ "INNER JOIN files ON subselect.files_id=files.id\n" .
"INNER JOIN artists ON artists.id=files.artists_id\n\t" .
"INNER JOIN albums ON albums.id=files.albums_id\n\t" .
"WHERE artists.id=? AND albums.name=''\n\t" .
# FIXME: rework PathElements
if(ref($constraints[$#constraints]) eq "ID3FS::PathElement::Artist")
{
- return $self->artist_tracks($constraints[$#constraints]->{id});
+ return $self->artist_tracks($constraints[$#constraints]->{id}, @constraints);
}
elsif(ref($constraints[$#constraints]) eq "ID3FS::PathElement::Album")
{