Browse Source

Use new style load (start/raw_start) commands already from 0.9.4 onwards (for some reason I increased this to 0.9.7 earlier). Fixes #251 and fixes #227 again.

pull/280/head
Eric Kok 9 years ago
parent
commit
746ad242a2
  1. 6
      app/src/main/java/org/transdroid/daemon/Rtorrent/RtorrentAdapter.java

6
app/src/main/java/org/transdroid/daemon/Rtorrent/RtorrentAdapter.java

@ -179,7 +179,7 @@ public class RtorrentAdapter implements IDaemonAdapter { @@ -179,7 +179,7 @@ public class RtorrentAdapter implements IDaemonAdapter {
}
byte[] bytes = baos.toByteArray();
int size = Math.max(((int) file.length() * 2) + XMLRPC_EXTRA_PADDING, XMLRPC_MINIMUM_SIZE);
if (version >= 907) {
if (version >= 904) {
makeRtorrentCall(log, "network.xmlrpc.size_limit.set", new Object[]{size + XMLRPC_EXTRA_PADDING});
makeRtorrentCall(log, "load.raw_start", new Object[]{bytes});
} else {
@ -192,7 +192,7 @@ public class RtorrentAdapter implements IDaemonAdapter { @@ -192,7 +192,7 @@ public class RtorrentAdapter implements IDaemonAdapter {
// Request to add a torrent by URL
String url = ((AddByUrlTask) task).getUrl();
if (version >= 907) {
if (version >= 904) {
makeRtorrentCall(log, "load.start", new String[]{"", url});
} else {
makeRtorrentCall(log, "load_start", new String[]{url});
@ -203,7 +203,7 @@ public class RtorrentAdapter implements IDaemonAdapter { @@ -203,7 +203,7 @@ public class RtorrentAdapter implements IDaemonAdapter {
// Request to add a magnet link by URL
String magnet = ((AddByMagnetUrlTask) task).getUrl();
if (version >= 907) {
if (version >= 904) {
makeRtorrentCall(log, "load.start", new String[]{"", magnet});
} else {
makeRtorrentCall(log, "load_start", new String[]{magnet});

Loading…
Cancel
Save