Browse Source

Fix speed parsing when units are unrecognized

pull/173/head
sudisk 10 years ago
parent
commit
ae3e5be9e4
  1. 2
      lib/src/org/transdroid/daemon/Qbittorrent/QbittorrentAdapter.java

2
lib/src/org/transdroid/daemon/Qbittorrent/QbittorrentAdapter.java

@ -461,7 +461,7 @@ public class QbittorrentAdapter implements IDaemonAdapter { @@ -461,7 +461,7 @@ public class QbittorrentAdapter implements IDaemonAdapter {
} else if (parts[1].equals("KiB/s")) {
return (int) (number * 1024);
}
return (int) (Double.parseDouble(parts[0]));
return (int) (Double.parseDouble(normalizeNumber(parts[0])));
}
private String normalizeNumber(String in) {

Loading…
Cancel
Save