diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2018-08-15 11:32:35 -0500 |
|---|---|---|
| committer | LostDragonist <lost.dragonist@gmail.com> | 2018-08-15 11:53:33 -0500 |
| commit | 8f861307597134187fc9dba121fad4018c759c91 (patch) | |
| tree | abf75884fef2341b2a7b0a1d17f529daf97caf16 /src/downloadmanager.cpp | |
| parent | 17e4ec7b13e6df86cc473b78d8e44d37b2e80cf7 (diff) | |
Correct file category when manually querying info
The Nexus API appears to have been changed back in July 2018 to match what MO was expecting without the conversion.
Diffstat (limited to 'src/downloadmanager.cpp')
| -rw-r--r-- | src/downloadmanager.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 331556cb..150fa12c 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -703,7 +703,7 @@ void DownloadManager::removeDownload(int index, bool deleteFile) DownloadState minState;
if (index == -3) {
minState = STATE_UNINSTALLED;
- }
+ }
else
minState = index == -1 ? STATE_READY : STATE_INSTALLED;
@@ -1445,18 +1445,6 @@ QDateTime DownloadManager::matchDate(const QString &timeString) }
-static EFileCategory convertFileCategory(int id)
-{
- // TODO: need to handle file categories in the mod page plugin
- switch (id) {
- case 0: return TYPE_MAIN;
- case 1: return TYPE_UPDATE;
- case 2: return TYPE_OPTION;
- default: return TYPE_MAIN;
- }
-}
-
-
void DownloadManager::nxmFilesAvailable(QString, int, QVariant userData, QVariant resultData, int requestID)
{
std::set<int>::iterator idIter = m_RequestIDs.find(requestID);
@@ -1493,7 +1481,7 @@ void DownloadManager::nxmFilesAvailable(QString, int, QVariant userData, QVarian if (!info->m_FileInfo->version.isValid()) {
info->m_FileInfo->version = info->m_FileInfo->newestVersion;
}
- info->m_FileInfo->fileCategory = convertFileCategory(fileInfo["category_id"].toInt());
+ info->m_FileInfo->fileCategory = fileInfo["category_id"].toInt();
info->m_FileInfo->fileTime = matchDate(fileInfo["date"].toString());
info->m_FileInfo->fileID = fileInfo["id"].toInt();
info->m_FileInfo->fileName = fileInfo["uri"].toString();
@@ -1518,7 +1506,7 @@ void DownloadManager::nxmFilesAvailable(QString, int, QVariant userData, QVarian QVariantMap fileInfo = selection.getChoiceData().toMap();
info->m_FileInfo->name = fileInfo["name"].toString();
info->m_FileInfo->version.parse(fileInfo["version"].toString());
- info->m_FileInfo->fileCategory = convertFileCategory(fileInfo["category_id"].toInt());
+ info->m_FileInfo->fileCategory = fileInfo["category_id"].toInt();
info->m_FileInfo->fileID = fileInfo["id"].toInt();
} else {
emit showMessage(tr("No matching file found on Nexus! Maybe this file is no longer available or it was renamed?"));
|
