consider "ignore leading 'the' word" function while sorting playlist

This commit is contained in:
Andrzej Rybczak
2009-03-06 18:14:01 +01:00
parent e209a86e8e
commit 93fd687ec1
3 changed files with 17 additions and 14 deletions

View File

@@ -275,6 +275,11 @@ bool Playlist::Sorting(MPD::Song *a, MPD::Song *b)
std::string sb = (b->*(*SortDialog)[i].second)();
ToLower(sa);
ToLower(sb);
if (Config.ignore_leading_the)
{
RemoveTheWord(sa);
RemoveTheWord(sb);
}
if (sa != sb)
return sa < sb;
}