1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-01 03:20:20 +02:00

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

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 {