Update size abbreviations e.g. from kb, mb, to KiB, MiB (#212)

This commit is contained in:
metaprime 2017-11-17 02:36:21 -08:00 committed by GitHub
parent a2fc44aced
commit 5912eb9c8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<String> getListOfAlbumRippers() throws Exception {