From dc4087604136162ba9b80620d7490cf1e014310b Mon Sep 17 00:00:00 2001 From: Ian Beckwith Date: Sun, 3 Oct 2010 06:02:02 +0100 Subject: [PATCH] tags(): fix screening out used tags --- lib/ID3FS/DB.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ID3FS/DB.pm b/lib/ID3FS/DB.pm index 2ca7f73..19015fd 100644 --- a/lib/ID3FS/DB.pm +++ b/lib/ID3FS/DB.pm @@ -204,7 +204,7 @@ sub tags print "VALS: ", Dumper \@tags_vals; if(@tags) { - push(@clauses, "(t2.id NOT IN ( " . join(', ', @tags) ." ) )"); + push(@clauses, "( t2.parents_id='' AND t2.id NOT IN ( " . join(', ', @tags) ." ) )"); } for my $pair (@tags_vals) { @@ -393,7 +393,7 @@ sub tags_subselect my @clauses=(); if(@tags) { - push(@clauses, "(t1.id IN ( " . join(', ', @tags) ." ) )"); + push(@clauses, "(t1.parents_id='' AND t1.id IN ( " . join(', ', @tags) ." ) )"); } for my $pair (@tags_vals) { -- 2.11.0