Skip to content

Commit

Permalink
new subcommand "tagtypes available"
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorporation committed Sep 29, 2024
1 parent 2bb4c5e commit d4fbfb9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ libmpdclient 2.23 (not yet released)
- command "playlistlength", "stickertypes", "searchplaylist"
- tag "ShowMovement"
- new sticker find api
- new subcommand "tagtypes available"
* Support open end for mpd_search_add_window

libmpdclient 2.22 (2023/12/22)
Expand Down
13 changes: 13 additions & 0 deletions include/mpd/capabilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,19 @@ mpd_recv_url_scheme_pair(struct mpd_connection *connection)
bool
mpd_send_list_tag_types(struct mpd_connection *connection);

/**
* Requests a list of available tag types. This are the tags enabled in
* the configuration. Use mpd_recv_tag_type_pair() to obtain the list
* of "tagtype" pairs.
*
* @param connection the connection to MPD
* @return true on success, false on error
*
* @since libmpdclient 2.23, MPD 0.24
*/
bool
mpd_send_list_tag_types_available(struct mpd_connection *connection);

/**
* Receives the next tag type name. Call this in a loop after
* mpd_send_list_tag_types().
Expand Down
6 changes: 6 additions & 0 deletions src/capabilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ mpd_send_list_tag_types(struct mpd_connection *connection)
return mpd_send_command(connection, "tagtypes", NULL);
}

bool
mpd_send_list_tag_types_available(struct mpd_connection *connection)
{
return mpd_send_command(connection, "tagtypes", "available", NULL);
}

static bool
mpd_send_tag_types_v(struct mpd_connection *connection,
const char *sub_command,
Expand Down

0 comments on commit d4fbfb9

Please sign in to comment.