Show mod downloads and release dates in the launcher MODS panel

The MODS tab now shows each installed mod's total GitHub downloads
(summed asset download_count across all releases), its first and latest
release dates, and a Sort row (Name / Popularity / Release date /
Last updated) persisted in options.modSort.

The launcher already fetched per-repo release lists for update checks, so
the data rides the same cached fetch: parseRelease keeps download_count
and published_at, writeCache persists them, and a cache entry written
before the fields existed is treated as stale and refetched once instead
of hiding the line behind an old cache.
This commit is contained in:
Shane McGovern
2026-08-03 22:17:56 +01:00
parent 51fb4db82e
commit 6ea59f1a79
5 changed files with 314 additions and 3 deletions
+6
View File
@@ -2593,6 +2593,8 @@ function RomImporter:_syncModUpdateInfo(force)
latest = best and best.version or nil,
best = best,
releases = packed.releases,
downloads = ModUpdate.totalDownloads(packed.releases),
dates = ModUpdate.releaseDates(packed.releases),
err = nil,
checkedAt = packed.checkedAt or os.time(),
}
@@ -2722,6 +2724,8 @@ function RomImporter:_modGithubAction(id, action)
self.modUpdateInfo[row.id] = {
status = status, latest = best and best.version, best = best,
releases = releases,
downloads = ModUpdate.totalDownloads(releases),
dates = ModUpdate.releaseDates(releases),
}
self._modVersions = {
id = row.id, name = row.name, current = row.version,
@@ -2765,6 +2769,8 @@ function RomImporter:_modGithubAction(id, action)
self.modUpdateInfo[row.id] = {
status = status, latest = best and best.version, best = best,
releases = releases, checkedAt = os.time(),
downloads = ModUpdate.totalDownloads(releases),
dates = ModUpdate.releaseDates(releases),
}
if status == "available" and best then
self.modNotice = { ok = true,