Browse Source

Fix parsing bug - seq_dl and f_l_piece_prio can be missing if the

torrent is new and hasn't downloaded metadata yet
pull/515/head
Phillip Dykman 5 years ago
parent
commit
c50dee31ea
  1. 8
      app/src/main/java/org/transdroid/daemon/Qbittorrent/QbittorrentAdapter.java

8
app/src/main/java/org/transdroid/daemon/Qbittorrent/QbittorrentAdapter.java

@ -521,8 +521,12 @@ public class QbittorrentAdapter implements IDaemonAdapter { @@ -521,8 +521,12 @@ public class QbittorrentAdapter implements IDaemonAdapter {
ratio = tor.getDouble("ratio");
dlspeed = tor.getInt("dlspeed");
upspeed = tor.getInt("upspeed");
dlseq = tor.getBoolean("seq_dl");
dlflp = tor.getBoolean("f_l_piece_prio");
if (tor.has("seq_dl")) {
dlseq = tor.getBoolean("seq_dl");
}
if (tor.has("f_l_piece_prio")) {
dlflp = tor.getBoolean("f_l_piece_prio");
}
if (tor.has("uploaded")) {
uploaded = tor.getLong("uploaded");
} else {

Loading…
Cancel
Save