Browse Source

Merge pull request #279 from H3mul/qBittorrent_force_recheck

Add force recheck command for qBittorrent
pull/311/head
Eric Kok 8 years ago
parent
commit
28786b03d1
  1. 2
      app/src/main/java/org/transdroid/daemon/Daemon.java
  2. 5
      app/src/main/java/org/transdroid/daemon/Qbittorrent/QbittorrentAdapter.java

2
app/src/main/java/org/transdroid/daemon/Daemon.java

@ -364,7 +364,7 @@ public enum Daemon { @@ -364,7 +364,7 @@ public enum Daemon {
}
public static boolean supportsForceRecheck(Daemon type) {
return type == uTorrent || type == BitTorrent || type == Deluge || type == rTorrent || type == Transmission || type == Dummy;
return type == uTorrent || type == BitTorrent || type == Deluge || type == rTorrent || type == Transmission || type == Dummy || type == qBittorrent;
}
public static boolean supportsExtraPassword(Daemon type) {

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

@ -298,6 +298,11 @@ public class QbittorrentAdapter implements IDaemonAdapter { @@ -298,6 +298,11 @@ public class QbittorrentAdapter implements IDaemonAdapter {
}
return new DaemonTaskSuccessResult(task);
case ForceRecheck:
// Force recheck a torrent
makeRequest(log, "/command/recheck", new BasicNameValuePair("hash", task.getTargetTorrent().getUniqueID()));
return new DaemonTaskSuccessResult(task);
case SetTransferRates:
// TODO: This doesn't seem to work yet

Loading…
Cancel
Save