From 7cb76788bd5d1aa35ce38122efa4fdba4433d046 Mon Sep 17 00:00:00 2001 From: Sky Date: Sun, 30 Mar 2014 05:16:31 +0100 Subject: Try to read 'authorList' in mcmod.info for authors first, fall back to deprecated 'authors' if nothing is found. --- logic/Mod.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'logic/Mod.cpp') 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) -- cgit v1.2.3