aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbUtils.c
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2006-12-11 19:52:05 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2006-12-11 19:52:05 +0000
commita26582e99135346bcfc895b1a85ba8b2b6f411c5 (patch)
tree6ce2b938b3e7e04a21deb1bbb87e6a6a7541a68c /src/dbUtils.c
parentf597dd02354cf613b82596d1b108e914f38c5325 (diff)
downloadmpd-a26582e99135346bcfc895b1a85ba8b2b6f411c5.tar.gz
mpd-a26582e99135346bcfc895b1a85ba8b2b6f411c5.tar.xz
mpd-a26582e99135346bcfc895b1a85ba8b2b6f411c5.zip
Fixing "find any" and "list * any" to actually find matches.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5137 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/dbUtils.c')
-rw-r--r--src/dbUtils.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c
index b713b2a8b..a93a30e8f 100644
--- a/src/dbUtils.c
+++ b/src/dbUtils.c
@@ -247,17 +247,21 @@ static int tagItemFoundAndMatches(Song * song, int type, char *str)
{
int i;
- if (type == LOCATE_TAG_FILE_TYPE) {
+ if (type == LOCATE_TAG_FILE_TYPE || type == LOCATE_TAG_ANY_TYPE) {
if (0 == strcmp(str, getSongUrl(song)))
return 1;
+ if (type == LOCATE_TAG_FILE_TYPE)
+ return 0;
}
if (!song->tag)
return 0;
for (i = 0; i < song->tag->numOfItems; i++) {
- if (song->tag->items[i].type != type)
+ if (type != LOCATE_TAG_ANY_TYPE &&
+ song->tag->items[i].type != type) {
continue;
+ }
if (0 == strcmp(str, song->tag->items[i].value))
return 1;