mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
@@ -11,8 +11,15 @@ namespace NzbDrone.Common.Extensions
|
||||
{
|
||||
const int bytesInKb = 1024;
|
||||
|
||||
if (bytes < 0) return "-" + SizeSuffix(-bytes);
|
||||
if (bytes == 0) return "0 B";
|
||||
if (bytes < 0)
|
||||
{
|
||||
return "-" + SizeSuffix(-bytes);
|
||||
}
|
||||
|
||||
if (bytes == 0)
|
||||
{
|
||||
return "0 B";
|
||||
}
|
||||
|
||||
var mag = (int)Math.Log(bytes, bytesInKb);
|
||||
var adjustedSize = bytes / (decimal)Math.Pow(bytesInKb, mag);
|
||||
|
||||
Reference in New Issue
Block a user