diff options
Diffstat (limited to 'launcher/modplatform/flame')
-rw-r--r-- | launcher/modplatform/flame/FlamePackExportTask.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/launcher/modplatform/flame/FlamePackExportTask.cpp b/launcher/modplatform/flame/FlamePackExportTask.cpp index 54294d7b..d729e977 100644 --- a/launcher/modplatform/flame/FlamePackExportTask.cpp +++ b/launcher/modplatform/flame/FlamePackExportTask.cpp @@ -36,7 +36,7 @@ #include "modplatform/helpers/HashUtils.h" #include "tasks/Task.h" -const QString FlamePackExportTask::TEMPLATE = "<li><a href={url}>{name}{authors}</a></li>"; +const QString FlamePackExportTask::TEMPLATE = "<li><a href={url}>{name}{authors}</a></li>\n"; FlamePackExportTask::FlamePackExportTask(const QString& name, const QString& version, @@ -338,12 +338,10 @@ void FlamePackExportTask::buildZip() QString content = ""; for (auto mod : resolvedFiles) { if (mod.isMod) { - 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 += QString(TEMPLATE) + .replace("{name}", mod.name) + .replace("{url}", ModPlatform::getMetaURL(ModPlatform::ResourceProvider::FLAME, mod.addonId)) + .replace("{authors}", !mod.authors.isEmpty() ? QString(" (by {%1})").arg(mod.authors) : ""); } } content = "<ul>" + content + "</ul>"; |