Skip to content

Commit

Permalink
现在可以自动启用 自定义集数获取规则
Browse files Browse the repository at this point in the history
  • Loading branch information
wushuo894 committed Dec 3, 2024
1 parent 7bd66b0 commit 16ec39f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
4 changes: 1 addition & 3 deletions UPDATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
~~修复mikan出现问题后无法下载种子导致一直发送通知的问题~~

经排查是极空间系统的自动更新出现bug, 导致docker挂载出现问题
现在可以自动启用 自定义集数获取规则
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ani.rss</groupId>
<artifactId>ani-rss</artifactId>
<version>1.1.205</version>
<version>1.1.206</version>

<properties>
<maven.compiler.source>11</maven.compiler.source>
Expand Down
14 changes: 11 additions & 3 deletions src/main/java/ani/rss/util/AniUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,19 @@ public static Ani getAni(String url, String text, String type, String bgmUrl) {
if (ani.getOva()) {
return ani;
}

String s = HttpReq.get(url, true)
.thenFunction(HttpResponse::body);
List<Item> items = ItemsUtil.getItems(ani, s, new Item());
if (items.size() == 1) {
// 自定义集数获取规则
if (items.get(0).getEpisode() == 1080) {
ani.setCustomEpisode(true);
}
}

// 自动推断剧集偏移
if (config.getOffset()) {
String s = HttpReq.get(url, true)
.thenFunction(HttpResponse::body);
List<Item> items = ItemsUtil.getItems(ani, s, new Item());
if (items.isEmpty()) {
return ani;
}
Expand Down

0 comments on commit 16ec39f

Please sign in to comment.