调整下载

This commit is contained in:
zlzw 2024-06-15 06:10:42 +08:00
parent 88527c5716
commit af963f0af8
2 changed files with 8 additions and 2 deletions

View File

@ -10,5 +10,5 @@ import retrofit2.http.POST;
public interface ToolsNetApi { public interface ToolsNetApi {
@FormUrlEncoded @FormUrlEncoded
@POST("/api/v2/torrents/add") @POST("/api/v2/torrents/add")
Call<HttpBody<BaseBean>> postDownloadBt(@Field("urls")String urls, @Field("savePath")String savePath); Call<HttpBody<BaseBean>> postDownloadBt(@Field("urls")String urls, @Field("savepath")String savePath);
} }

View File

@ -125,7 +125,13 @@ public class BTDownloadManager {
} else { } else {
array = JSON.parseArray(_title); 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) { public synchronized static void done(String path, String filename, String hash1, String hash2, String tid) {