Add "added" timestamp to song database
- added is set to current time, if a new song is added to the database. - GetAdded falls back to mtime. Code for proxy plugin is missing, this needs a patch for libmpdclient. closes #378
This commit is contained in:
@@ -60,6 +60,13 @@ DatabaseVisitorHelper::Commit()
|
||||
? a.GetLastModified() > b.GetLastModified()
|
||||
: a.GetLastModified() < b.GetLastModified();
|
||||
});
|
||||
else if (sort == TagType(SORT_TAG_ADDED))
|
||||
std::stable_sort(songs.begin(), songs.end(),
|
||||
[descending](const DetachedSong &a, const DetachedSong &b){
|
||||
return descending
|
||||
? a.GetAdded() > b.GetAdded()
|
||||
: a.GetAdded() < b.GetAdded();
|
||||
});
|
||||
else
|
||||
std::stable_sort(songs.begin(), songs.end(),
|
||||
[sort, descending](const DetachedSong &a,
|
||||
|
||||
Reference in New Issue
Block a user