Merge branch 'tagtypes_reset' of https://github.com/jcorporation/MPD

This commit is contained in:
Max Kellermann 2024-11-02 20:58:06 +01:00
commit 7dce7ad32d
3 changed files with 10 additions and 1 deletions

2
NEWS
View File

@ -16,7 +16,7 @@ ver 0.24 (not yet released)
- "sticker find" supports sort and window parameter and new sticker compare operators "eq", "lt", "gt", "contains" and "starts_with" - "sticker find" supports sort and window parameter and new sticker compare operators "eq", "lt", "gt", "contains" and "starts_with"
- consume only idle flags that were subscribed to - consume only idle flags that were subscribed to
- volume command is no longer deprecated - volume command is no longer deprecated
- new "available" subcommand for tagtypes - new "available" and "reset" subcommands for tagtypes
- searching stored playlists respond now with song position - searching stored playlists respond now with song position
* database * database
- attribute "added" shows when each song was added to the database - attribute "added" shows when each song was added to the database

View File

@ -1688,6 +1688,11 @@ Connection settings
Shows the list of tag types configured Shows the list of tag types configured
by the ``metadata_to_use`` setting. by the ``metadata_to_use`` setting.
:command:`tagtypes reset {NAME...}`
Clear the list of tag types and Re-enable one or more tags
from the list of tag types for this client. These will no
longer be hidden from responses to this client.
.. _command_protocol: .. _command_protocol:
:command:`protocol` :command:`protocol`

View File

@ -107,6 +107,10 @@ handle_tagtypes(Client &client, Request request, Response &r)
} else if (StringIsEqual(cmd, "available")) { } else if (StringIsEqual(cmd, "available")) {
tag_print_types_available(r); tag_print_types_available(r);
return CommandResult::OK; return CommandResult::OK;
} else if (StringIsEqual(cmd, "reset")) {
client.tag_mask = TagMask::None();
client.tag_mask |= ParseTagMask(request);
return CommandResult::OK;
} else { } else {
r.Error(ACK_ERROR_ARG, "Unknown sub command"); r.Error(ACK_ERROR_ARG, "Unknown sub command");
return CommandResult::ERROR; return CommandResult::ERROR;