Add support for ignoring diacritics while searching and filtering lists
This commit is contained in:
@@ -1086,19 +1086,19 @@ std::string SongToString(const MPD::Song &s)
|
||||
|
||||
bool TagEntryMatcher(const Regex::Regex &rx, const PrimaryTag &pt)
|
||||
{
|
||||
return Regex::search(pt.tag(), rx);
|
||||
return Regex::search(pt.tag(), rx, Config.ignore_diacritics);
|
||||
}
|
||||
|
||||
bool AlbumEntryMatcher(const Regex::Regex &rx, const NC::Menu<AlbumEntry>::Item &item, bool filter)
|
||||
{
|
||||
if (item.isSeparator() || item.value().isAllTracksEntry())
|
||||
return filter;
|
||||
return Regex::search(AlbumToString(item.value()), rx);
|
||||
return Regex::search(AlbumToString(item.value()), rx, Config.ignore_diacritics);
|
||||
}
|
||||
|
||||
bool SongEntryMatcher(const Regex::Regex &rx, const MPD::Song &s)
|
||||
{
|
||||
return Regex::search(SongToString(s), rx);
|
||||
return Regex::search(SongToString(s), rx, Config.ignore_diacritics);
|
||||
}
|
||||
|
||||
bool MoveToTag(NC::Menu<PrimaryTag> &tags, const std::string &primary_tag)
|
||||
|
||||
Reference in New Issue
Block a user