From af963f0af8ccaa35e97aec1305a4c57851efca3f Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Sat, 15 Jun 2024 06:10:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/yutou/nas/okhttp/api/ToolsNetApi.java | 2 +- src/main/java/com/yutou/nas/utils/BTDownloadManager.java | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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) {