1
0
mirror of https://github.com/packwiz/packwiz.git synced 2025-05-01 02:06:30 +02:00

Fix modrinth update message (fixes )

This commit is contained in:
comp500 2021-08-22 20:12:37 +01:00
parent 7ac193eb87
commit 92ba8effaa

@ -64,9 +64,17 @@ func (u mrUpdater) CheckUpdate(mods []core.Mod, mcVersion string, pack core.Pack
continue
}
newFilename := newVersion.Files[0].Filename
// Prefer the primary file
for _, v := range newVersion.Files {
if v.Primary {
newFilename = v.Filename
}
}
results[i] = core.UpdateCheck{
UpdateAvailable: true,
UpdateString: mod.FileName + " -> " + newVersion.Files[0].Filename,
UpdateString: mod.FileName + " -> " + newFilename,
CachedState: cachedStateStore{data.ModID, newVersion},
}
}