diff --git a/app/src/main/java/org/transdroid/daemon/Daemon.java b/app/src/main/java/org/transdroid/daemon/Daemon.java index 9cb96642..f93b08d4 100644 --- a/app/src/main/java/org/transdroid/daemon/Daemon.java +++ b/app/src/main/java/org/transdroid/daemon/Daemon.java @@ -315,7 +315,7 @@ public enum Daemon { } public static boolean supportsCustomFolder(Daemon type) { - return type == rTorrent || type == Tfb4rt || type == Bitflu || type == Deluge || type == Transmission || type == BitTorrent || type == uTorrent || type == Dummy; + return type == rTorrent || type == Tfb4rt || type == Bitflu || type == Deluge || type == Transmission || type == BitTorrent || type == uTorrent || type == qBittorrent || type == Dummy; } public static boolean supportsSetTransferRates(Daemon type) { diff --git a/app/src/main/java/org/transdroid/daemon/Qbittorrent/QbittorrentAdapter.java b/app/src/main/java/org/transdroid/daemon/Qbittorrent/QbittorrentAdapter.java index d9670752..342d1c62 100644 --- a/app/src/main/java/org/transdroid/daemon/Qbittorrent/QbittorrentAdapter.java +++ b/app/src/main/java/org/transdroid/daemon/Qbittorrent/QbittorrentAdapter.java @@ -415,7 +415,12 @@ public class QbittorrentAdapter implements IDaemonAdapter { * @return The URL to request */ private String buildWebUIUrl(String path) { - return (settings.getSsl() ? "https://" : "http://") + settings.getAddress() + ":" + settings.getPort() + path; + String proxyFolder = settings.getFolder(); + if (proxyFolder == null) + proxyFolder = ""; + else if (proxyFolder.endsWith("/")) + proxyFolder = proxyFolder.substring(0, proxyFolder.length() - 1); + return (settings.getSsl() ? "https://" : "http://") + settings.getAddress() + ":" + settings.getPort() + proxyFolder + path; } private TorrentDetails parseJsonTorrentDetails(JSONArray messages) throws JSONException {