Merge pull request #276 from wushuo894/test

1.2.4
This commit is contained in:
wushuo
2025-04-09 22:04:10 +08:00
committed by GitHub
3 changed files with 17 additions and 6 deletions

View File

@@ -1,8 +1,6 @@
### 改动
- 优化了合集的字幕组识别
- 修复了未开启重命名导致任务不自动开始下载的问题
- 优化了windows端鼠标连点导致打开多个浏览器界面的问题
- 修复qBittorrent 4.6.7无法开始自动下载的问题
### 疑惑为什么增加赞助功能的可以看一下我发的 discussion

View File

@@ -6,7 +6,7 @@
<groupId>ani.rss</groupId>
<artifactId>ani-rss</artifactId>
<version>1.2.3</version>
<version>1.2.4</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>

View File

@@ -206,7 +206,14 @@ public class qBittorrent implements BaseDownload {
*/
public static Boolean start(TorrentsInfo torrentsInfo, Config config) {
String host = config.getHost();
return HttpReq.post(host + "/api/v2/torrents/start")
boolean b = HttpReq.post(host + "/api/v2/torrents/start")
.form("hashes", torrentsInfo.getHash())
.thenFunction(HttpResponse::isOk);
if (b) {
return true;
}
return HttpReq.post(host + "/api/v2/torrents/resume")
.form("hashes", torrentsInfo.getHash())
.thenFunction(HttpResponse::isOk);
}
@@ -372,7 +379,13 @@ public class qBittorrent implements BaseDownload {
Assert.isTrue(b, "重命名失败 {} ==> {}", name, newPath);
}
start(torrentsInfo, config);
for (int i = 0; i < 10; i++) {
Boolean b = start(torrentsInfo, config);
if (b) {
break;
}
ThreadUtil.sleep(1000);
}
if (newNames.isEmpty()) {
return;