Merge branch 'tagtypes_available' of https://github.com/jcorporation/MPD
This commit is contained in:
commit
f82a385be2
1
NEWS
1
NEWS
|
@ -16,6 +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
|
||||||
* database
|
* database
|
||||||
- attribute "added" shows when each song was added to the database
|
- attribute "added" shows when each song was added to the database
|
||||||
- fix integer overflows with 64-bit inode numbers
|
- fix integer overflows with 64-bit inode numbers
|
||||||
|
|
|
@ -1678,6 +1678,12 @@ Connection settings
|
||||||
Announce that this client is interested in all tag
|
Announce that this client is interested in all tag
|
||||||
types. This is the default setting for new clients.
|
types. This is the default setting for new clients.
|
||||||
|
|
||||||
|
.. _command_tagtypes_available:
|
||||||
|
|
||||||
|
:command:`tagtypes available`
|
||||||
|
Shows the list of tag types configured
|
||||||
|
by the ``metadata_to_use`` setting.
|
||||||
|
|
||||||
.. _partition_commands:
|
.. _partition_commands:
|
||||||
|
|
||||||
Partition commands
|
Partition commands
|
||||||
|
|
|
@ -18,6 +18,14 @@ tag_print_types(Response &r) noexcept
|
||||||
r.Fmt(FMT_STRING("tagtype: {}\n"), tag_item_names[i]);
|
r.Fmt(FMT_STRING("tagtype: {}\n"), tag_item_names[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
tag_print_types_available(Response &r) noexcept
|
||||||
|
{
|
||||||
|
for (unsigned i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++)
|
||||||
|
if (global_tag_mask.Test(TagType(i)))
|
||||||
|
r.Fmt(FMT_STRING("tagtype: {}\n"), tag_item_names[i]);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tag_print(Response &r, TagType type, std::string_view value) noexcept
|
tag_print(Response &r, TagType type, std::string_view value) noexcept
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,6 +15,9 @@ class Response;
|
||||||
void
|
void
|
||||||
tag_print_types(Response &response) noexcept;
|
tag_print_types(Response &response) noexcept;
|
||||||
|
|
||||||
|
void
|
||||||
|
tag_print_types_available(Response &response) noexcept;
|
||||||
|
|
||||||
void
|
void
|
||||||
tag_print(Response &response, TagType type, std::string_view value) noexcept;
|
tag_print(Response &response, TagType type, std::string_view value) noexcept;
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,9 @@ handle_tagtypes(Client &client, Request request, Response &r)
|
||||||
} else if (StringIsEqual(cmd, "disable")) {
|
} else if (StringIsEqual(cmd, "disable")) {
|
||||||
client.tag_mask &= ~ParseTagMask(request);
|
client.tag_mask &= ~ParseTagMask(request);
|
||||||
return CommandResult::OK;
|
return CommandResult::OK;
|
||||||
|
} else if (StringIsEqual(cmd, "available")) {
|
||||||
|
tag_print_types_available(r);
|
||||||
|
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;
|
||||||
|
|
Loading…
Reference in New Issue