From 5912eb9c8af2e48dbb7e7b36e5d72a4b5fa3b40a Mon Sep 17 00:00:00 2001 From: metaprime Date: Fri, 17 Nov 2017 02:36:21 -0800 Subject: [PATCH] Update size abbreviations e.g. from kb, mb, to KiB, MiB (#212) --- src/main/java/com/rarchives/ripme/utils/Utils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/rarchives/ripme/utils/Utils.java b/src/main/java/com/rarchives/ripme/utils/Utils.java index f1683d77..28d42f20 100644 --- a/src/main/java/com/rarchives/ripme/utils/Utils.java +++ b/src/main/java/com/rarchives/ripme/utils/Utils.java @@ -367,13 +367,13 @@ public class Utils { public static String bytesToHumanReadable(int bytes) { float fbytes = (float) bytes; - String[] mags = new String[] {"", "k", "m", "g", "t"}; + String[] mags = new String[] {"", "K", "M", "G", "T"}; int magIndex = 0; while (fbytes >= 1024) { fbytes /= 1024; magIndex++; } - return String.format("%.2f%sb", fbytes, mags[magIndex]); + return String.format("%.2f%siB", fbytes, mags[magIndex]); } public static List getListOfAlbumRippers() throws Exception {