Improvements to modlist export

Added .replace("{mod_id}", modID)

Signed-off-by: hanlie <48323966+HanlieChina@users.noreply.github.com>
This commit is contained in:
hanlie
2025-03-19 00:24:58 +08:00
parent d0b9073f60
commit 6bda537633
4 changed files with 16 additions and 0 deletions

View File

@ -203,6 +203,7 @@ QString exportToModList(QList<Mod*> mods, QString lineTemplate)
for (auto mod : mods) {
auto meta = mod->metadata();
auto modName = mod->name();
auto modID = mod->mod_id();
auto url = mod->homepage();
auto ver = mod->version();
if (ver.isEmpty() && meta != nullptr)
@ -211,6 +212,7 @@ QString exportToModList(QList<Mod*> mods, QString lineTemplate)
auto filename = mod->fileinfo().fileName();
lines << QString(lineTemplate)
.replace("{name}", modName)
.replace("{mod_id}", modID)
.replace("{url}", url)
.replace("{version}", ver)
.replace("{authors}", authors)