Skip to content

Commit

Permalink
Support MPD 0.24 command stickernamestypes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorporation committed Sep 29, 2024
1 parent 2bb4c5e commit 9a09b7f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
libmpdclient 2.23 (not yet released)
* support MPD protocol 0.24.0
- allow window for listplaylist and listplaylistinfo
- command "playlistlength", "stickertypes", "searchplaylist"
- command "playlistlength", "stickertypes", "stickernamestypes", "searchplaylist"
- tag "ShowMovement"
- new sticker find api
* Support open end for mpd_search_add_window
Expand Down
14 changes: 14 additions & 0 deletions include/mpd/sticker.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,24 @@ mpd_send_stickernames(struct mpd_connection *connection);
* @return true on success, false on error
*
* @since libmpdclient 2.23, MPD 0.24
*
*/
bool
mpd_send_stickertypes(struct mpd_connection *connection);

/**
* Obtains an uniq and sorted list of all sticker names and their types. Call
* mpd_recv_pair() to receive each response item.
*
* @param connection the connection to MPD
* @param type the object type, e.g. "song" or NULL for all types
* @return true on success, false on error
*
* @since libmpdclient 2.23, MPD 0.24
*/
bool
mpd_send_stickernamestypes(struct mpd_connection *connection, const char *type);

/**
* Search for stickers in the database.
* Constraints may be specified.
Expand Down
1 change: 1 addition & 0 deletions libmpdclient.ld
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ global:
mpd_return_sticker;
mpd_send_stickernames;
mpd_send_stickertypes;
mpd_send_stickernamestypes;
mpd_sticker_search_begin;
mpd_sticker_search_add_value_constraint;
mpd_sticker_search_add_sort;
Expand Down
8 changes: 8 additions & 0 deletions src/sticker.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ mpd_send_stickertypes(struct mpd_connection *connection)
return mpd_send_command(connection, "stickertypes", NULL);
}

bool
mpd_send_stickernamestypes(struct mpd_connection *connection, const char *type)
{
assert(connection != NULL);

return mpd_send_command(connection, "stickernamestypes", type, NULL);
}

bool
mpd_sticker_search_begin(struct mpd_connection *connection, const char *type,
const char *base_uri, const char *name)
Expand Down

0 comments on commit 9a09b7f

Please sign in to comment.