summaryrefslogtreecommitdiffstats
path: root/logic/Mod.cpp
diff options
context:
space:
mode:
authorSky <git@bunnies.cc>2014-03-30 05:16:31 +0100
committerSky <git@bunnies.cc>2014-03-30 05:17:46 +0100
commit7cb76788bd5d1aa35ce38122efa4fdba4433d046 (patch)
tree762c727d5816f1bac254a94584ec5f118dcd5e32 /logic/Mod.cpp
parent20eb5ac3cca3e0ae3a7b706e8392df9aaa499c0c (diff)
downloadMultiMC-7cb76788bd5d1aa35ce38122efa4fdba4433d046.tar
MultiMC-7cb76788bd5d1aa35ce38122efa4fdba4433d046.tar.gz
MultiMC-7cb76788bd5d1aa35ce38122efa4fdba4433d046.tar.lz
MultiMC-7cb76788bd5d1aa35ce38122efa4fdba4433d046.tar.xz
MultiMC-7cb76788bd5d1aa35ce38122efa4fdba4433d046.zip
Try to read 'authorList' in mcmod.info for authors first, fall back to deprecated 'authors' if nothing is found.
Diffstat (limited to 'logic/Mod.cpp')
-rw-r--r--logic/Mod.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/logic/Mod.cpp b/logic/Mod.cpp
index 22ac36c8..ce931b05 100644
--- a/logic/Mod.cpp
+++ b/logic/Mod.cpp
@@ -175,7 +175,10 @@ void Mod::ReadMCModInfo(QByteArray contents)
}
}
m_description = firstObj.value("description").toString();
- QJsonArray authors = firstObj.value("authors").toArray();
+ QJsonArray authors = firstObj.value("authorList").toArray();
+ if (authors.size() == 0)
+ authors = firstObj.value("authors").toArray();
+
if (authors.size() == 0)
m_authors = "";
else if (authors.size() >= 1)