mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Use name/count model.
This commit is contained in:
@@ -150,12 +150,12 @@ namespace DiscImageChef.Server.Controllers
|
||||
if(newstats.Versions != null)
|
||||
foreach(NameValueStats nvs in newstats.Versions)
|
||||
{
|
||||
Version existing = _ctx.Versions.FirstOrDefault(c => c.Value == nvs.name);
|
||||
Version existing = _ctx.Versions.FirstOrDefault(c => c.Name == nvs.name);
|
||||
|
||||
if(existing == null)
|
||||
_ctx.Versions.Add(new Version
|
||||
{
|
||||
Value = nvs.name, Count = nvs.Value
|
||||
Name = nvs.name, Count = nvs.Value
|
||||
});
|
||||
else
|
||||
existing.Count += nvs.Value;
|
||||
|
||||
Reference in New Issue
Block a user