summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index cdf363cc..ce476143 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -5550,7 +5550,7 @@ void MainWindow::nxmUpdatesAvailable(QString gameName, int modID, QVariant userD
requiresInfo = true;
}
- if (mod->getLastNexusQuery().addDays(1) <= QDateTime::currentDateTime())
+ if (mod->getLastNexusQuery().addDays(1) <= QDateTime::currentDateTimeUtc())
requiresInfo = true;
}
@@ -5577,7 +5577,7 @@ void MainWindow::nxmModInfoAvailable(QString gameName, int modID, QVariant userD
std::vector<ModInfo::Ptr> modsList = ModInfo::getByModID(gameNameReal, modID);
for (auto mod : modsList) {
QDateTime now = QDateTime::currentDateTimeUtc();
- QDateTime updateTarget = mod->getLastNexusUpdate().addSecs(3600);
+ QDateTime updateTarget = mod->getExpires();
if (now >= updateTarget) {
mod->setNewestVersion(result["version"].toString());
mod->setLastNexusUpdate(QDateTime::currentDateTimeUtc());
@@ -5594,6 +5594,7 @@ void MainWindow::nxmModInfoAvailable(QString gameName, int modID, QVariant userD
mod->setIsEndorsed(false);
}
mod->setLastNexusQuery(QDateTime::currentDateTimeUtc());
+ mod->setNexusLastModified(QDateTime::fromSecsSinceEpoch(result["updated_timestamp"].toInt()));
mod->saveMeta();
}
}