From 1281b6ee208d784732470c80c687491f08a80be8 Mon Sep 17 00:00:00 2001 From: Thomas Riccardi Date: Sat, 12 Nov 2016 19:47:09 +0100 Subject: [PATCH] rtorrent: fix stop that only paused Used the same commands as ruTorrent. --- .../daemon/Rtorrent/RtorrentAdapter.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/transdroid/daemon/Rtorrent/RtorrentAdapter.java b/app/src/main/java/org/transdroid/daemon/Rtorrent/RtorrentAdapter.java index 96f231e4..e86567ed 100644 --- a/app/src/main/java/org/transdroid/daemon/Rtorrent/RtorrentAdapter.java +++ b/app/src/main/java/org/transdroid/daemon/Rtorrent/RtorrentAdapter.java @@ -226,49 +226,51 @@ public class RtorrentAdapter implements IDaemonAdapter { case Pause: // Pause a torrent - makeRtorrentCall(log, "d.pause", new String[]{task.getTargetTorrent().getUniqueID()}); + makeRtorrentCall(log, "d.stop", new String[]{task.getTargetTorrent().getUniqueID()}); return new DaemonTaskSuccessResult(task); case PauseAll: // Resume all torrents - makeRtorrentCall(log, "d.multicall2", new String[]{"","main", "d.pause="}); + makeRtorrentCall(log, "d.multicall2", new String[]{"","main", "d.stop="}); return new DaemonTaskSuccessResult(task); case Resume: // Resume a torrent - makeRtorrentCall(log, "d.resume", new String[]{task.getTargetTorrent().getUniqueID()}); + makeRtorrentCall(log, "d.start", new String[]{task.getTargetTorrent().getUniqueID()}); return new DaemonTaskSuccessResult(task); case ResumeAll: // Resume all torrents - makeRtorrentCall(log, "d.multicall2", new String[]{"", "main", "d.resume="}); + makeRtorrentCall(log, "d.multicall2", new String[]{"", "main", "d.start="}); return new DaemonTaskSuccessResult(task); case Stop: // Stop a torrent makeRtorrentCall(log, "d.stop", new String[]{task.getTargetTorrent().getUniqueID()}); + makeRtorrentCall(log, "d.close", new String[]{task.getTargetTorrent().getUniqueID()}); return new DaemonTaskSuccessResult(task); case StopAll: // Stop all torrents - makeRtorrentCall(log, "d.multicall2", new String[]{"", "main", "d.stop="}); + makeRtorrentCall(log, "d.multicall2", new String[]{"", "main", "d.stop=", "d.close="}); return new DaemonTaskSuccessResult(task); case Start: // Start a torrent + makeRtorrentCall(log, "d.open", new String[]{task.getTargetTorrent().getUniqueID()}); makeRtorrentCall(log, "d.start", new String[]{task.getTargetTorrent().getUniqueID()}); return new DaemonTaskSuccessResult(task); case StartAll: // Start all torrents - makeRtorrentCall(log, "d.multicall2", new String[]{"", "main", "d.start="}); + makeRtorrentCall(log, "d.multicall2", new String[]{"", "main", "d.open=", "d.start="}); return new DaemonTaskSuccessResult(task); case SetFilePriorities: