db/Print: pass TagType to PrintUniqueTags()
This commit is contained in:
parent
0505cb8f7e
commit
f7fb8a33d7
@ -289,7 +289,7 @@ handle_list(Client &client, Request args, Response &r)
|
|||||||
PrintSongUris(r, client.GetPartition(), filter.get());
|
PrintSongUris(r, client.GetPartition(), filter.get());
|
||||||
else
|
else
|
||||||
PrintUniqueTags(r, client.GetPartition(),
|
PrintUniqueTags(r, client.GetPartition(),
|
||||||
tagType, group_mask, filter.get());
|
TagType(tagType), group_mask, filter.get());
|
||||||
return CommandResult::OK;
|
return CommandResult::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,7 +303,7 @@ PrintUniqueTag(Response &r, TagType tag_type,
|
|||||||
|
|
||||||
void
|
void
|
||||||
PrintUniqueTags(Response &r, Partition &partition,
|
PrintUniqueTags(Response &r, Partition &partition,
|
||||||
unsigned type, TagMask group_mask,
|
TagType type, TagMask group_mask,
|
||||||
const SongFilter *filter)
|
const SongFilter *filter)
|
||||||
{
|
{
|
||||||
assert(type < TAG_NUM_OF_ITEM_TYPES);
|
assert(type < TAG_NUM_OF_ITEM_TYPES);
|
||||||
@ -313,8 +313,6 @@ PrintUniqueTags(Response &r, Partition &partition,
|
|||||||
const DatabaseSelection selection("", true, filter);
|
const DatabaseSelection selection("", true, filter);
|
||||||
|
|
||||||
using namespace std::placeholders;
|
using namespace std::placeholders;
|
||||||
const auto f = std::bind(PrintUniqueTag, std::ref(r),
|
const auto f = std::bind(PrintUniqueTag, std::ref(r), type, _1);
|
||||||
(TagType)type, _1);
|
db.VisitUniqueTags(selection, type, group_mask, f);
|
||||||
db.VisitUniqueTags(selection, (TagType)type,
|
|
||||||
group_mask, f);
|
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ PrintSongUris(Response &r, Partition &partition,
|
|||||||
|
|
||||||
void
|
void
|
||||||
PrintUniqueTags(Response &r, Partition &partition,
|
PrintUniqueTags(Response &r, Partition &partition,
|
||||||
unsigned type, TagMask group_mask,
|
TagType type, TagMask group_mask,
|
||||||
const SongFilter *filter);
|
const SongFilter *filter);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user