mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-02 12:26:48 +01:00
Merge pull request #6451 from jonaski/tagreader
Fix setting mtime/btime in tagreader
This commit is contained in:
commit
d3404a8dd0
@ -126,10 +126,13 @@ void TagReader::ReadFile(const QString& filename,
|
||||
song->set_url(url.constData(), url.size());
|
||||
song->set_filesize(info.size());
|
||||
|
||||
#if QT_VERSION >= 0x051000
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
qint64 mtime = info.lastModified().toSecsSinceEpoch();
|
||||
qint64 btime = info.birthtime().toSecsSinceEpoch();
|
||||
#elif QT_VERSION >= 0x050800
|
||||
qint64 btime = mtime;
|
||||
if (info.birthTime().isValid()) {
|
||||
btime = info.birthTime().toSecsSinceEpoch();
|
||||
}
|
||||
#elif QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
|
||||
qint64 mtime = info.lastModified().toSecsSinceEpoch();
|
||||
qint64 btime = info.created().toSecsSinceEpoch();
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user