diff --git a/src/main/java/com/yutou/nas/okhttp/api/ToolsNetApi.java b/src/main/java/com/yutou/nas/okhttp/api/ToolsNetApi.java index 6a90852..df3527d 100644 --- a/src/main/java/com/yutou/nas/okhttp/api/ToolsNetApi.java +++ b/src/main/java/com/yutou/nas/okhttp/api/ToolsNetApi.java @@ -10,5 +10,5 @@ import retrofit2.http.POST; public interface ToolsNetApi { @FormUrlEncoded @POST("/api/v2/torrents/add") - Call> postDownloadBt(@Field("urls")String urls, @Field("savePath")String savePath); + Call> postDownloadBt(@Field("urls")String urls, @Field("savepath")String savePath); } diff --git a/src/main/java/com/yutou/nas/utils/BTDownloadManager.java b/src/main/java/com/yutou/nas/utils/BTDownloadManager.java index 06b3e4f..4c3bc0e 100644 --- a/src/main/java/com/yutou/nas/utils/BTDownloadManager.java +++ b/src/main/java/com/yutou/nas/utils/BTDownloadManager.java @@ -125,7 +125,13 @@ public class BTDownloadManager { } else { array = JSON.parseArray(_title); } - return array.contains(key); + for (Object item : array) { + String _item = (String) item; + if (_item.replace(" ", "").equals(key.replace(" ", ""))) { + return true; + } + } + return false; } public synchronized static void done(String path, String filename, String hash1, String hash2, String tid) {