Merge pull request #4631 from sobkas/fix_issues_4627_4368

Set ctime and mtime in Song returned by PodcastEpisode::ToSong
This commit is contained in:
John Maguire 2014-11-30 14:54:08 +00:00
commit 9f5388476c
1 changed files with 7 additions and 0 deletions

View File

@ -182,6 +182,13 @@ Song PodcastEpisode::ToSong(const Podcast& podcast) const {
ret.set_year(publication_date().date().year());
ret.set_comment(description());
ret.set_id(database_id());
ret.set_ctime(publication_date().toTime_t());
if (listened()) {
ret.set_mtime(listened_date().toTime_t());
} else {
ret.set_mtime(publication_date().toTime_t());
}
if (ret.length_nanosec() < 0) {
ret.set_length_nanosec(-1);