Maintain date added and date last opened.
[dorian] / model / library.cpp
index 1a66639..a8c0db4 100644 (file)
@@ -121,6 +121,7 @@ bool Library::add(const QString &path)
     beginInsertRows(QModelIndex(), size, size);
     Book *book = new Book(path);
     book->peek();
+    book->dateAdded = QDateTime::currentDateTimeUtc();
     mBooks.append(book);
     save();
     endInsertRows();