aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2006-10-27 23:07:34 +0000
committerWarren Dukes <warren.dukes@gmail.com>2006-10-27 23:07:34 +0000
commitf6b982eb079b900338737daf6fdfc057c7143697 (patch)
treeae8b89c397ef5aff6a81544a75cdefa697e48557 /src
parenta8a932a215941633a86526a7c037919138b836e8 (diff)
downloadmpd-f6b982eb079b900338737daf6fdfc057c7143697.tar.gz
mpd-f6b982eb079b900338737daf6fdfc057c7143697.tar.xz
mpd-f6b982eb079b900338737daf6fdfc057c7143697.zip
add support for: list file
This behaves the same as: list filename git-svn-id: https://svn.musicpd.org/mpd/trunk@4952 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r--src/dbUtils.c14
-rw-r--r--src/song.c2
-rw-r--r--src/song.h3
3 files changed, 13 insertions, 6 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c
index c8b637b88..d8b4c0018 100644
--- a/src/dbUtils.c
+++ b/src/dbUtils.c
@@ -22,12 +22,14 @@
#include "myfprintf.h"
#include "utils.h"
#include "playlist.h"
+#include "song.h"
#include "tag.h"
#include "tagTracker.h"
#include "log.h"
#define LOCATE_TAG_FILE_TYPE TAG_NUM_OF_ITEM_TYPES+10
-#define LOCATE_TAG_FILE_KEY "filename"
+#define LOCATE_TAG_FILE_KEY SONG_FILE
+#define LOCATE_TAG_FILE_KEY_OLD "filename"
#define LOCATE_TAG_ANY_TYPE TAG_NUM_OF_ITEM_TYPES+20
#define LOCATE_TAG_ANY_KEY "any"
@@ -46,15 +48,19 @@ int getLocateTagItemType(char *str)
{
int i;
- if (0 == strcasecmp(str, LOCATE_TAG_FILE_KEY)) {
+ if (0 == strcasecmp(str, LOCATE_TAG_FILE_KEY) ||
+ 0 == strcasecmp(str, LOCATE_TAG_FILE_KEY_OLD))
+ {
return LOCATE_TAG_FILE_TYPE;
}
- if (0 == strcasecmp(str, LOCATE_TAG_ANY_KEY)) {
+ if (0 == strcasecmp(str, LOCATE_TAG_ANY_KEY))
+ {
return LOCATE_TAG_ANY_TYPE;
}
- for (i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++) {
+ for (i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++)
+ {
if (0 == strcasecmp(str, mpdTagItemKeys[i]))
return i;
}
diff --git a/src/song.c b/src/song.c
index 1197a436f..902cbeaf2 100644
--- a/src/song.c
+++ b/src/song.c
@@ -28,8 +28,6 @@
#include "myfprintf.h"
#define SONG_KEY "key: "
-#define SONG_FILE "file: "
-#define SONG_TIME "Time: "
#define SONG_MTIME "mtime: "
#include <stdlib.h>
diff --git a/src/song.h b/src/song.h
index c803b9695..2e0e68f42 100644
--- a/src/song.h
+++ b/src/song.h
@@ -33,6 +33,9 @@
#define SONG_TYPE_FILE 1
#define SONG_TYPE_URL 2
+#define SONG_FILE "file: "
+#define SONG_TIME "Time: "
+
typedef struct _Song {
char *url;
mpd_sint8 type;