diff options
author | Arno <arno@disconnect.de> | 2017-08-26 06:07:44 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2017-08-26 06:07:44 +0200 |
commit | baf1130ec1148d007f2c98382c217af4731719c7 (patch) | |
tree | eb5f4a497dddbe92c852ac647bdcec82f0153652 /indexerwidget.cpp | |
parent | c692d78080dc503e795345e6c48a753da10ae153 (diff) | |
download | BeetPlayer-baf1130ec1148d007f2c98382c217af4731719c7.tar.gz BeetPlayer-baf1130ec1148d007f2c98382c217af4731719c7.tar.bz2 BeetPlayer-baf1130ec1148d007f2c98382c217af4731719c7.zip |
Fix date added
Hmm, you never stop learning. Not so obviously we want the st_mtime
instead of st_ctime from struct stat, because we're intrested in the
*data* modification time, not the metadata modification time...
For more info, see https://stackoverflow.com/questions/3385203/regarding-
access-time-unix
Diffstat (limited to 'indexerwidget.cpp')
-rw-r--r-- | indexerwidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indexerwidget.cpp b/indexerwidget.cpp index d773485..a3b0cd8 100644 --- a/indexerwidget.cpp +++ b/indexerwidget.cpp @@ -132,12 +132,12 @@ void BeetReader::run(){ quint16 year = file.tag()->year(); QString parentDir = QFileInfo(QString(s)).absolutePath(); QFileInfo albumDir(parentDir); - QDateTime created = albumDir.created(); + QDateTime dateAdded = albumDir.lastModified(); //write to database int artistId = doArtist(artist); int genreId = doGenre(genre); - int albumId = doAlbum(album, year, created); + int albumId = doAlbum(album, year, dateAdded); doSong(title, track, albumId, genreId, artistId, s, length); if(ctr % 100 == 0){ |