From 177f5c0446ab09f4010c86e9d8e1d3d02a8a76a9 Mon Sep 17 00:00:00 2001 From: Silarn Date: Mon, 4 Feb 2019 00:59:05 -0600 Subject: Fix issues with duplicate requests, expand parallel requests to 6 --- src/mainwindow.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index fecf8704..cdf363cc 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -5489,6 +5489,7 @@ void MainWindow::nxmUpdatesAvailable(QString gameName, int modID, QVariant userD } std::vector modsList = ModInfo::getByModID(gameNameReal, modID); + bool requiresInfo = false; for (auto mod : modsList) { bool foundUpdate = false; bool oldFile = false; @@ -5544,13 +5545,18 @@ void MainWindow::nxmUpdatesAvailable(QString gameName, int modID, QVariant userD if (foundUpdate) { // Just get the standard data updates for endorsements and descriptions mod->setLastNexusUpdate(QDateTime::currentDateTimeUtc()); - mod->updateNXMInfo(); } else { // Scrape mod data here so we can use the mod version if no file update was located - NexusInterface::instance(&m_PluginContainer)->requestModInfo(gameName, modID, this, QVariant(), QString()); + requiresInfo = true; } + + if (mod->getLastNexusQuery().addDays(1) <= QDateTime::currentDateTime()) + requiresInfo = true; } + if (requiresInfo) + NexusInterface::instance(&m_PluginContainer)->requestModInfo(gameName, modID, this, QVariant(), QString()); + if (--m_ModsToUpdate <= 0) { statusBar()->hide(); } else { -- cgit v1.3.1