new feature: sort songs in browser by mtime (optional)

This commit is contained in:
Andrzej Rybczak
2009-10-10 23:32:05 +02:00
parent b48133a743
commit 3551057dbb
7 changed files with 17 additions and 2 deletions

View File

@@ -233,7 +233,9 @@ bool CaseInsensitiveSorting::operator()(const Item &a, const Item &b)
case itPlaylist:
return cmp(a.name, b.name) < 0;
case itSong:
return operator()(a.song, b.song);
return Config.browser_sort_by_mtime
? a.song->GetMTime() > b.song->GetMTime()
: operator()(a.song, b.song);
default: // there's no other type, just silence compiler.
return 0;
}