diff options
Diffstat (limited to 'src/locate.c')
-rw-r--r-- | src/locate.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/locate.c b/src/locate.c index 175bca35a..e27858a0e 100644 --- a/src/locate.c +++ b/src/locate.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2009 The Music Player Daemon Project + * Copyright (C) 2003-2010 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -17,6 +17,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "config.h" #include "locate.h" #include "path.h" #include "tag.h" @@ -42,9 +43,9 @@ locate_parse_type(const char *str) if (0 == g_ascii_strcasecmp(str, LOCATE_TAG_ANY_KEY)) return LOCATE_TAG_ANY_TYPE; - for (i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++) - if (0 == g_ascii_strcasecmp(str, tag_item_names[i])) - return i; + i = tag_name_parse_i(str); + if (i != TAG_NUM_OF_ITEM_TYPES) + return i; return -1; } |