1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-01-31 09:44:50 +01:00

Fix ctime in tagreader

This commit is contained in:
Jonas Kvinge 2019-07-10 20:02:51 +02:00
parent c3f1e312b3
commit 4081bdd752

View File

@ -175,7 +175,7 @@ void TagReader::ReadFile(const QString &filename, pb::tagreader::SongMetadata *s
song->set_filesize(info.size()); song->set_filesize(info.size());
song->set_mtime(info.lastModified().toTime_t()); song->set_mtime(info.lastModified().toTime_t());
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
song->set_ctime(info.birthTime().toTime_t()); song->set_ctime(info.birthTime().isValid() ? info.birthTime().toTime_t() : info.lastModified().toTime_t());
#else #else
song->set_ctime(info.created().toTime_t()); song->set_ctime(info.created().toTime_t());
#endif #endif