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 "modplatform/helpers/HashUtils.h"
|
||||||
#include "tasks/Task.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,
|
FlamePackExportTask::FlamePackExportTask(const QString& name,
|
||||||
const QString& version,
|
const QString& version,
|
||||||
@ -338,11 +338,12 @@ void FlamePackExportTask::buildZip()
|
|||||||
QString content = "";
|
QString content = "";
|
||||||
for (auto mod : resolvedFiles) {
|
for (auto mod : resolvedFiles) {
|
||||||
if (mod.isMod) {
|
if (mod.isMod) {
|
||||||
content += QString(TEMPLATE)
|
auto line = QString(TEMPLATE)
|
||||||
.replace("{name}", mod.name)
|
.replace("{name}", mod.name)
|
||||||
.replace("{url}", ModPlatform::getMetaURL(ModPlatform::ResourceProvider::FLAME, mod.slug))
|
.replace("{url}", ModPlatform::getMetaURL(ModPlatform::ResourceProvider::FLAME, mod.slug));
|
||||||
.replace("{authors}", mod.authors) +
|
if (!mod.authors.isEmpty())
|
||||||
"\n";
|
line = line.replace("{authors}", QString(" (by {%1})").arg(mod.authors));
|
||||||
|
content += line + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
content = "<ul>" + content + "</ul>";
|
content = "<ul>" + content + "</ul>";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user