This commit is contained in:
bryanthaboi
2026-08-18 11:29:50 -04:00
parent d5ad830fb8
commit bd1046f398
11 changed files with 595 additions and 36 deletions
+8 -3
View File
@@ -4449,9 +4449,14 @@ function RomImporter:_findStatsCached(entry)
end
return nil -- retry window open; _requestFindStats decides what to do
end
if entry.downloads ~= nil or entry.first_release or entry.last_release then
cached = { total = entry.downloads, first = entry.first_release,
latest = entry.last_release, done = true }
local ModIndex = require("src.mods.ModIndex")
local dl = ModIndex.downloadStats(entry)
local dates = ModIndex.releaseDates(entry)
if dl or dates then
cached = { total = dl and dl.total, recent = dl and dl.recent,
windowDays = dl and dl.window_days, asOf = dl and dl.as_of,
first = dates and dates.first, latest = dates and dates.latest,
done = true }
self._findStatsCache[entry.id] = cached
return cached
end