Browse Source

Merge pull request #546 from bitcometdev/master

Fix task id parsing for BitComet v1.68 and later
pull/551/head
Eric Kok 5 years ago committed by GitHub
parent
commit
dae2ad2b81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/src/main/java/org/transdroid/daemon/BitComet/BitCometAdapter.java

4
app/src/main/java/org/transdroid/daemon/BitComet/BitCometAdapter.java

@ -610,8 +610,6 @@ public class BitCometAdapter implements IDaemonAdapter { @@ -610,8 +610,6 @@ public class BitCometAdapter implements IDaemonAdapter {
settings.getType()));
// @formatter:on
id++; // Stop/start/etc. requests are made by ID, which is the order number in the returned XML list :-S
} else if (next == XmlPullParser.START_TAG && tagName.equals("task")) {
// Start of a new 'transfer' item; reset gathered torrent data
@ -638,6 +636,8 @@ public class BitCometAdapter implements IDaemonAdapter { @@ -638,6 +636,8 @@ public class BitCometAdapter implements IDaemonAdapter {
if (next == XmlPullParser.TEXT) {
if (tagName.equals("name")) {
name = xpp.getText().trim();
} else if (tagName.equals("id")) {
id = Integer.parseInt(xpp.getText().trim());
} else if (tagName.equals("infohash")) {
hash = xpp.getText().trim();
} else if (tagName.equals("state")) {

Loading…
Cancel
Save