From 42ae919c9688ec45935983f62dcbb498ca77a205 Mon Sep 17 00:00:00 2001 From: Silarn Date: Mon, 11 Feb 2019 22:51:58 -0600 Subject: Fix issue with downloads not being remove on failure Also adds helpful message when API key is not valid or present --- src/downloadmanager.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/downloadmanager.cpp') diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 24942a06..df69d17a 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -1671,7 +1671,16 @@ void DownloadManager::nxmRequestFailed(QString gameName, int modID, int fileID, } } - removePending(gameName, modID, fileID); + QString gameRealName; + QStringList games(m_ManagedGame->validShortNames()); + games += m_ManagedGame->gameShortName(); + for (auto game : games) { + MOBase::IPluginGame *gamePlugin = m_OrganizerCore->getGame(game); + if (gamePlugin->gameNexusName().compare(gameName, Qt::CaseInsensitive) == 0) { + gameRealName = gamePlugin->gameShortName(); + } + } + removePending(gameRealName, modID, fileID); emit showMessage(tr("Failed to request file info from nexus: %1").arg(errorString)); } -- cgit v1.3.1