projects
/
id3fs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4ad175d
)
id3fs-index -l: bare tags: don't display tags with children (eg year)
author
Ian Beckwith
<ianb@erislabs.net>
Wed, 3 Nov 2010 20:48:21 +0000
(20:48 +0000)
committer
Ian Beckwith
<ianb@erislabs.net>
Wed, 3 Nov 2010 20:48:21 +0000
(20:48 +0000)
lib/ID3FS/DB.pm
patch
|
blob
|
history
diff --git
a/lib/ID3FS/DB.pm
b/lib/ID3FS/DB.pm
index
48b5a01
..
5821b53
100644
(file)
--- a/
lib/ID3FS/DB.pm
+++ b/
lib/ID3FS/DB.pm
@@
-152,9
+152,10
@@
sub last_update
sub bare_tags
{
my($self)=@_;
- my $sql=("SELECT tags.name FROM tags\n" .
- "WHERE tags.parents_id=''\n" .
- "GROUP BY tags.name\n");
+ my $sql=("SELECT t1.name FROM tags t1\n" .
+ "LEFT JOIN tags t2 on t1.id=t2.parents_id\n" .
+ "WHERE t1.parents_id='' AND t2.id IS NULL\n" .
+ "GROUP BY t1.name\n");
my @names=$self->cmd_firstcol($sql);
return (@names);
}