diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2013-05-16 20:57:03 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2013-05-16 20:57:03 +0200 |
commit | de9a999124a2e08237178ffc60e0999fb1e72c56 (patch) | |
tree | 5dbca27c18c932dcf90acb56f4364020d92b36b8 /src/mutable_song.cpp | |
parent | 1c6c9e9c5a1dcb0c0d3be8bd41df6c4b000c7245 (diff) |
browser: add support for sorting by mtime in local browser
Diffstat (limited to 'src/mutable_song.cpp')
-rw-r--r-- | src/mutable_song.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mutable_song.cpp b/src/mutable_song.cpp index cdbb8877..3c3cc7c0 100644 --- a/src/mutable_song.cpp +++ b/src/mutable_song.cpp @@ -160,12 +160,24 @@ unsigned MutableSong::getDuration() const return Song::getDuration(); } +time_t MutableSong::getMTime() const +{ + if (m_mtime > 0) + return m_mtime; + else + return Song::getMTime(); +} void MutableSong::setDuration(unsigned int duration) { m_duration = duration; } +void MutableSong::setMTime(time_t mtime) +{ + m_mtime = mtime; +} + void MutableSong::setTags(SetFunction set, const std::string &value, const std::string &delimiter) { std::vector<std::string> tags; |