mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Free diskspace in UI
New: View Diskspace for root directories visible in UI #ND-98 fixed
This commit is contained in:
parent
2bd866f590
commit
4212da9146
9 changed files with 95 additions and 32 deletions
|
@ -112,6 +112,12 @@ namespace NzbDrone.Core
|
|||
private const Decimal ONE_GIGABYTE = ONE_MEGABYTE * 1024M;
|
||||
|
||||
public static string ToBestFileSize(this long bytes, int precision = 0)
|
||||
{
|
||||
var ulongBytes = (ulong)bytes;
|
||||
return ulongBytes.ToBestFileSize(precision);
|
||||
}
|
||||
|
||||
public static string ToBestFileSize(this ulong bytes, int precision = 0)
|
||||
{
|
||||
if (bytes == 0)
|
||||
return "0B";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue