Fix negative replay gain values

This commit is contained in:
Midori Kochiya 2024-03-10 19:16:03 +08:00
parent 3e1c3133ca
commit 321994496a

View file

@ -102,7 +102,7 @@ public class ReplayGainUtil {
private static Float parseReplayGainTag(Metadata.Entry entry) {
try {
return Float.parseFloat(entry.toString().replaceAll("[^\\d.]", ""));
return Float.parseFloat(entry.toString().replaceAll("[^\\d.-]", ""));
} catch (NumberFormatException exception) {
return 0f;
}