Updated authors string in modlist
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
81c1a95166
commit
df932c6587
@ -36,7 +36,7 @@
|
||||
#include "modplatform/helpers/HashUtils.h"
|
||||
#include "tasks/Task.h"
|
||||
|
||||
const QString FlamePackExportTask::TEMPLATE = "<li><a href={url}>{name} (by {authors})</a></li>";
|
||||
const QString FlamePackExportTask::TEMPLATE = "<li><a href={url}>{name}{authors}</a></li>";
|
||||
|
||||
FlamePackExportTask::FlamePackExportTask(const QString& name,
|
||||
const QString& version,
|
||||
@ -338,11 +338,12 @@ void FlamePackExportTask::buildZip()
|
||||
QString content = "";
|
||||
for (auto mod : resolvedFiles) {
|
||||
if (mod.isMod) {
|
||||
content += QString(TEMPLATE)
|
||||
.replace("{name}", mod.name)
|
||||
.replace("{url}", ModPlatform::getMetaURL(ModPlatform::ResourceProvider::FLAME, mod.slug))
|
||||
.replace("{authors}", mod.authors) +
|
||||
"\n";
|
||||
auto line = QString(TEMPLATE)
|
||||
.replace("{name}", mod.name)
|
||||
.replace("{url}", ModPlatform::getMetaURL(ModPlatform::ResourceProvider::FLAME, mod.slug));
|
||||
if (!mod.authors.isEmpty())
|
||||
line = line.replace("{authors}", QString(" (by {%1})").arg(mod.authors));
|
||||
content += line + "\n";
|
||||
}
|
||||
}
|
||||
content = "<ul>" + content + "</ul>";
|
||||
|
Loading…
Reference in New Issue
Block a user