Skip to content

Commit

Permalink
修复同时开启标题添加年份与自动使用tmdb时可能会出现标题异常
Browse files Browse the repository at this point in the history
  • Loading branch information
wushuo894 committed Sep 17, 2024
1 parent c1964de commit 0f11e04
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion UPDATE.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
完善关于信息
修复同时开启标题添加年份与自动使用tmdb时可能会出现标题异常
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.42</version>
<version>1.1.43</version>

<properties>
<maven.compiler.source>11</maven.compiler.source>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/ani/rss/util/AniUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ public static Ani getAni(String url, String text, String type) {

Integer year = ani.getYear();

if (StrUtil.isNotBlank(themoviedbName) && tmdb) {
title = themoviedbName;
}

if (titleYear && Objects.nonNull(year) && year > 0) {
title = StrFormatter.format("{} ({})", title, year);
themoviedbName = StrFormatter.format("{} ({})", themoviedbName, year);
Expand All @@ -242,10 +246,6 @@ public static Ani getAni(String url, String text, String type) {
}
}

if (StrUtil.isNotBlank(themoviedbName) && tmdb) {
ani.setTitle(themoviedbName);
}

String downloadPath = TorrentUtil.getDownloadPath(ani).get(0)
.toString()
.replace("\\", "/");
Expand Down

0 comments on commit 0f11e04

Please sign in to comment.