diff options
author | J. Alexander Treuman <jat@spatialrift.net> | 2007-03-31 18:43:16 +0000 |
---|---|---|
committer | J. Alexander Treuman <jat@spatialrift.net> | 2007-03-31 18:43:16 +0000 |
commit | e3e4964f59ab9201a8ee686f898dc68df3fe416d (patch) | |
tree | 48627dd6b666873efafd305c87041876184bf4e8 /src/command.c | |
parent | 2215c1796d68f680fa92631eeb745a4af8ca5fde (diff) | |
download | mpd-e3e4964f59ab9201a8ee686f898dc68df3fe416d.tar.gz mpd-e3e4964f59ab9201a8ee686f898dc68df3fe416d.tar.xz mpd-e3e4964f59ab9201a8ee686f898dc68df3fe416d.zip |
Adding tagtypes command to list available tag types (takes metadata_to_use
into account).
git-svn-id: https://svn.musicpd.org/mpd/trunk@5792 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/command.c')
-rw-r--r-- | src/command.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/command.c b/src/command.c index dc427629f..3ae17f334 100644 --- a/src/command.c +++ b/src/command.c @@ -95,6 +95,7 @@ #define COMMAND_PLAYLISTADD "playlistadd" #define COMMAND_PLAYLISTFIND "playlistfind" #define COMMAND_PLAYLISTSEARCH "playlistsearch" +#define COMMAND_TAGTYPES "tagtypes" #define COMMAND_STATUS_VOLUME "volume" #define COMMAND_STATUS_STATE "state" @@ -177,6 +178,12 @@ static int handleUrlHandlers(int fd, int *permission, int argc, char *argv[]) return printRemoteUrlHandlers(fd); } +static int handleTagTypes(int fd, int *permission, int argc, char *argv[]) +{ + printTagTypes(fd); + return 0; +} + static int handlePlay(int fd, int *permission, int argc, char *argv[]) { int song = -1; @@ -1043,6 +1050,7 @@ void initCommands(void) addCommand(COMMAND_PLAYLISTADD, PERMISSION_CONTROL, 2, 2, handlePlaylistAdd, NULL); addCommand(COMMAND_PLAYLISTFIND, PERMISSION_READ, 2, -1, handlePlaylistFind, NULL); addCommand(COMMAND_PLAYLISTSEARCH, PERMISSION_READ, 2, -1, handlePlaylistSearch, NULL); + addCommand(COMMAND_TAGTYPES, PERMISSION_READ, 0, 0, handleTagTypes, NULL); sortList(commandList); } |