browser: add support for sorting by mtime in local browser

This commit is contained in:
Andrzej Rybczak
2013-05-16 20:57:03 +02:00
parent 1c6c9e9c5a
commit de9a999124
3 changed files with 20 additions and 2 deletions

View File

@@ -498,7 +498,10 @@ void Browser::GetLocalDirectory(MPD::ItemList &v, const std::string &directory,
item.song = std::shared_ptr<MPD::Song>(s);
# ifdef HAVE_TAGLIB_H
if (!recursively)
{
s->setMTime(fs::last_write_time(e.path()));
Tags::read(*s);
}
# endif // HAVE_TAGLIB_H
v.push_back(item);
}