mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
Fix: Size will be displayed in best format when rejected (instead of bytes). It will also be displayed as info so it shows in the normal log.
This commit is contained in:
parent
207ea607a7
commit
2bf97fd76f
3 changed files with 5 additions and 4 deletions
|
@ -2,13 +2,13 @@
|
|||
|
||||
namespace NzbDrone.Core.Helpers
|
||||
{
|
||||
public class FileSizeFormatHelper
|
||||
public static class FileSizeFormatHelper
|
||||
{
|
||||
private const Decimal OneKiloByte = 1024M;
|
||||
private const Decimal OneMegaByte = OneKiloByte * 1024M;
|
||||
private const Decimal OneGigaByte = OneMegaByte * 1024M;
|
||||
|
||||
public static string Format(long bytes, int precision)
|
||||
public static string Format(long bytes, int precision = 0)
|
||||
{
|
||||
if (bytes == 0)
|
||||
return "0B";
|
Loading…
Add table
Add a link
Reference in a new issue