diff --git a/lib/src/org/transdroid/daemon/Deluge/DelugeAdapter.java b/lib/src/org/transdroid/daemon/Deluge/DelugeAdapter.java index 77e33c99..f3a1a427 100644 --- a/lib/src/org/transdroid/daemon/Deluge/DelugeAdapter.java +++ b/lib/src/org/transdroid/daemon/Deluge/DelugeAdapter.java @@ -614,10 +614,11 @@ public class DelugeAdapter implements IDaemonAdapter { return Priority.Off; case 2: return Priority.Normal; - case 3: + case 5: return Priority.High; + default: + return Priority.Low; } - return Priority.Low; } private int convertPriority(Priority priority) { @@ -627,7 +628,7 @@ public class DelugeAdapter implements IDaemonAdapter { case Normal: return 2; case High: - return 3; + return 5; default: return 1; } diff --git a/lib/src/org/transdroid/daemon/Torrent.java b/lib/src/org/transdroid/daemon/Torrent.java index f9eaed00..b9425d66 100644 --- a/lib/src/org/transdroid/daemon/Torrent.java +++ b/lib/src/org/transdroid/daemon/Torrent.java @@ -160,17 +160,11 @@ public final class Torrent implements Parcelable, Comparable { } /** - * Gives the upload/download seed ratio. If not downloading, - * it will base the ratio on the total size; so if you created the torrent yourself - * you will have downloaded 0 bytes, but the ratio will pretend you have 100%. + * Gives the upload/download seed ratio. * @return The ratio in range [0,r] */ public double getRatio() { - if (statusCode == TorrentStatus.Downloading) { - return ((double)uploadedEver) / ((double)downloadedEver); - } else { - return ((double)uploadedEver) / ((double)totalSize); - } + return ((double)uploadedEver) / ((double)downloadedEver); } /**