Remove getMaxBitrate rounding

This commit is contained in:
Niels van Velzen
2021-07-10 13:49:35 +02:00
parent 2c843f0724
commit 6c891ac661

View File

@@ -142,11 +142,10 @@ public class Utils {
String maxRate = get(UserPreferences.class).get(UserPreferences.Companion.getMaxBitrate());
Long autoRate = get(AutoBitrate.class).getBitrate();
if (maxRate == UserPreferences.MAX_BITRATE_AUTO && autoRate != null) {
return (int) autoRate.longValue();
return autoRate.intValue();
} else {
return (int) (Float.parseFloat(maxRate) * 1_000_000);
}
float factor = Float.parseFloat(maxRate) * 10;
return Math.min((int) factor * 100000, 100000000);
}
public static int getThemeColor(@NonNull Context context, int resourceId) {