Skip to content

Commit 118bdfc

Browse files
committed
The size is now only a signed 64 bit integer
1 parent 7e423f2 commit 118bdfc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ private static async Task RequestSteamAPI(string requestedID)
180180
/// Transforms bytes into a human readable string.
181181
/// Source: https://stackoverflow.com/a/11124118
182182
/// </summary>
183-
private static string BytesToString(ulong size)
183+
private static string BytesToString(long size)
184184
{
185185
string suffix;
186186
double readable;
@@ -257,15 +257,15 @@ private static async Task CalculateSize()
257257
if (details.TryGetProperty("publishedfiledetails", out var items))
258258
{
259259
var count = 1;
260-
var total = 0UL;
260+
var total = 0L;
261261

262262
foreach (var item in items.EnumerateArray())
263263
{
264264
var message = $"({count}/{index}) {item.GetProperty("publishedfileid"), -10} :";
265265

266266
if (item.TryGetProperty("title", out var title))
267267
{
268-
var size = ulong.Parse(item.GetProperty("file_size").ToString());
268+
var size = long.Parse(item.GetProperty("file_size").ToString());
269269

270270
ConsoleLog($"{message} {title} [{BytesToString(size)}]");
271271

@@ -298,4 +298,4 @@ private static async Task CalculateSize()
298298
}
299299
}
300300
}
301-
}
301+
}

0 commit comments

Comments
 (0)