projects
/
id3fs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
control filters via $ENABLE_FILTER at the top of ID3FS::Path
[id3fs.git]
/
lib
/
ID3FS
/
Path.pm
diff --git
a/lib/ID3FS/Path.pm
b/lib/ID3FS/Path.pm
index
dcc2a85
..
e99a801
100644
(file)
--- a/
lib/ID3FS/Path.pm
+++ b/
lib/ID3FS/Path.pm
@@
-10,9
+10,11
@@
our ($STATE_INVALID, $STATE_ROOT, $STATE_TAG, $STATE_TAGVAL,
our %priorities=( "OR" => 0, "AND" => 1, "NOT" => 2 );
our %priorities=( "OR" => 0, "AND" => 1, "NOT" => 2 );
-our $PATH_ALLTRACKS="TRACKS";
-our $PATH_NOARTIST="NOARTIST";
-our $PATH_NOALBUM="NOALBUM";
+our $PATH_ALLTRACKS= "TRACKS";
+our $PATH_NOARTIST = "NOARTIST";
+our $PATH_NOALBUM = "NOALBUM";
+
+our $ENABLE_FILTER = 1;
sub new
{
sub new
{
@@
-92,7
+94,9
@@
sub dirents
{
@dents=qw(AND OR);
}
{
@dents=qw(AND OR);
}
- push(@dents, $self->filter($PATH_ALLTRACKS, $PATH_NOARTIST));
+ push(@dents, ($ENABLE_FILTER ?
+ $self->filter($PATH_ALLTRACKS, $PATH_NOARTIST) :
+ ($PATH_ALLTRACKS, $PATH_NOARTIST)));
push(@dents, $self->artists());
}
}
push(@dents, $self->artists());
}
}
@@
-678,6
+682,7
@@
sub tags_subselect
return "\tSELECT id FROM files AS files_id\n";
}
my $tree=$self->{tagtree};
return "\tSELECT id FROM files AS files_id\n";
}
my $tree=$self->{tagtree};
+ # FIXME
print "UNDEF!!\n" unless($self->{tagtree});
my $parent=$self->trailing_tag_parent();
print "UNDEF!!\n" unless($self->{tagtree});
my $parent=$self->trailing_tag_parent();
@@
-691,7
+696,7
@@
sub tags_subselect
}
my ($sqlclause, @joins)=(undef, ());
($sqlclause, @joins) = $tree->to_sql($hasvals) if($tree);
}
my ($sqlclause, @joins)=(undef, ());
($sqlclause, @joins) = $tree->to_sql($hasvals) if($tree);
-# print "SQL(" . scalar(@joins) .": $sqlclause\n";
+# print "SQL(" . scalar(@joins) ."
)
: $sqlclause\n";
my $sql="\tSELECT fxt1.files_id FROM tags t1";
my @crosses=();
my @inners=();
my $sql="\tSELECT fxt1.files_id FROM tags t1";
my @crosses=();
my @inners=();