TagPrint: split tag_print()
Add one method that prints only the tag values, but not the song duration.
This commit is contained in:
parent
41a7203c28
commit
11a9536271
@ -42,12 +42,18 @@ tag_print(Client &client, TagType type, const char *value)
|
|||||||
client_printf(client, "%s: %s\n", tag_item_names[type], value);
|
client_printf(client, "%s: %s\n", tag_item_names[type], value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
tag_print_values(Client &client, const Tag &tag)
|
||||||
|
{
|
||||||
|
for (const auto &i : tag)
|
||||||
|
client_printf(client, "%s: %s\n",
|
||||||
|
tag_item_names[i.type], i.value);
|
||||||
|
}
|
||||||
|
|
||||||
void tag_print(Client &client, const Tag &tag)
|
void tag_print(Client &client, const Tag &tag)
|
||||||
{
|
{
|
||||||
if (tag.time >= 0)
|
if (tag.time >= 0)
|
||||||
client_printf(client, SONG_TIME "%i\n", tag.time);
|
client_printf(client, SONG_TIME "%i\n", tag.time);
|
||||||
|
|
||||||
for (const auto &i : tag)
|
tag_print_values(client, tag);
|
||||||
client_printf(client, "%s: %s\n",
|
|
||||||
tag_item_names[i.type], i.value);
|
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,9 @@ void tag_print_types(Client &client);
|
|||||||
void
|
void
|
||||||
tag_print(Client &client, TagType type, const char *value);
|
tag_print(Client &client, TagType type, const char *value);
|
||||||
|
|
||||||
|
void
|
||||||
|
tag_print_values(Client &client, const Tag &tag);
|
||||||
|
|
||||||
void
|
void
|
||||||
tag_print(Client &client, const Tag &tag);
|
tag_print(Client &client, const Tag &tag);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user