diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-05-08 19:00:48 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-05-08 19:00:48 +0200 |
commit | cf616efb5da6240db80a810f96abd8e8325ff3c9 (patch) | |
tree | 53fcc553c03a64e5b8029825f55629d579c0b03b | |
parent | 0902fd5bec9c151ad9098714325e163829d5b662 (diff) | |
download | MultiMC-cf616efb5da6240db80a810f96abd8e8325ff3c9.tar MultiMC-cf616efb5da6240db80a810f96abd8e8325ff3c9.tar.gz MultiMC-cf616efb5da6240db80a810f96abd8e8325ff3c9.tar.lz MultiMC-cf616efb5da6240db80a810f96abd8e8325ff3c9.tar.xz MultiMC-cf616efb5da6240db80a810f96abd8e8325ff3c9.zip |
Fix for #257
-rw-r--r-- | logic/Mod.cpp | 5 | ||||
-rw-r--r-- | logic/Mod.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/logic/Mod.cpp b/logic/Mod.cpp index ce931b05..c6872d6e 100644 --- a/logic/Mod.cpp +++ b/logic/Mod.cpp @@ -164,6 +164,7 @@ void Mod::ReadMCModInfo(QByteArray contents) m_name = firstObj.value("name").toString(); m_version = firstObj.value("version").toString(); m_homeurl = firstObj.value("url").toString(); + m_updateurl = firstObj.value("updateUrl").toString(); m_homeurl = m_homeurl.trimmed(); if(!m_homeurl.isEmpty()) { @@ -203,6 +204,8 @@ void Mod::ReadMCModInfo(QByteArray contents) else if (jsonDoc.isObject()) { auto val = jsonDoc.object().value("modinfoversion"); + if(val.isUndefined()) + val = jsonDoc.object().value("modListVersion"); int version = val.toDouble(); if (version != 2) { @@ -211,6 +214,8 @@ void Mod::ReadMCModInfo(QByteArray contents) return; } auto arrVal = jsonDoc.object().value("modlist"); + if(arrVal.isUndefined()) + arrVal = jsonDoc.object().value("modList"); if (arrVal.isArray()) { getInfoFromArray(arrVal.toArray()); diff --git a/logic/Mod.h b/logic/Mod.h index 2eb2b97a..cbb37bf3 100644 --- a/logic/Mod.h +++ b/logic/Mod.h @@ -121,6 +121,7 @@ protected: QString m_version; QString m_mcversion; QString m_homeurl; + QString m_updateurl; QString m_description; QString m_authors; QString m_credits; |