From caea740ffaa3bfb9e7830ae40f83629612965c46 Mon Sep 17 00:00:00 2001 From: Joel Verhagen Date: Tue, 23 Aug 2022 18:20:18 -0400 Subject: [PATCH] Use Int64 for download counts instead of Int32 Fix https://github.com/praeclarum/FuGetGallery/issues/176 --- Data/PackagesSearchResults.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Data/PackagesSearchResults.cs b/Data/PackagesSearchResults.cs index e88ed1a..5bb3984 100644 --- a/Data/PackagesSearchResults.cs +++ b/Data/PackagesSearchResults.cs @@ -47,7 +47,7 @@ void Read (string json) Version = (string)x["version"], Description = (string)x["description"], IconUrl = (string)x["iconUrl"], - TotalDownloads = ((int?)x["totalDownloads"]) ?? 0, + TotalDownloads = ((long?)x["totalDownloads"]) ?? 0, Authors = string.Join (", ", x["authors"]), }); } @@ -57,7 +57,7 @@ void Read (string json) existingResult.Version = newVersion; existingResult.Description = (string)x["description"]; existingResult.IconUrl = (string)x["iconUrl"]; - existingResult.TotalDownloads = ((int?)x["totalDownloads"]) ?? 0; + existingResult.TotalDownloads = ((long?)x["totalDownloads"]) ?? 0; existingResult.Authors = string.Join (", ", x["authors"]); } } @@ -109,7 +109,7 @@ public class PackagesSearchResult public string Version { get; set; } = ""; public string Description { get; set; } = ""; public string IconUrl { get; set; } = ""; - public int TotalDownloads { get; set; } = 0; + public long TotalDownloads { get; set; } = 0; public string Authors { get; set; } = ""; public override string ToString() => PackageId;