aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbUtils.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/dbUtils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c
index 527628833..858854f28 100644
--- a/src/dbUtils.c
+++ b/src/dbUtils.c
@@ -256,6 +256,7 @@ visitTag(struct client *client, struct strset *set,
struct song *song, enum tag_type tagType)
{
struct tag *tag = song->tag;
+ bool found = false;
if (tagType == LOCATE_TAG_FILE_TYPE) {
song_print_uri(client, song);
@@ -268,10 +269,12 @@ visitTag(struct client *client, struct strset *set,
for (unsigned i = 0; i < tag->num_items; i++) {
if (tag->items[i]->type == tagType) {
strset_add(set, tag->items[i]->value);
+ found = true;
}
}
- strset_add(set, "");
+ if (!found)
+ strset_add(set, "");
}
struct list_tags_data {