Skip to content

Commit

Permalink
优化tmdb标题获取
Browse files Browse the repository at this point in the history
  • Loading branch information
wushuo894 committed Dec 15, 2024
1 parent 9312f90 commit b0f86bc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/ani/rss/util/TmdbUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@ public synchronized static String getName(String name, String type) {
String firstAirDate = jsonObject.get("first_air_date").getAsString();

title = RenameUtil.getName(title);
year.set(String.valueOf(DateUtil.year(DateUtil.parse(firstAirDate))));
tmdbId.set(id);

if (StrUtil.isNotBlank(year.get())) {
year.set(String.valueOf(DateUtil.year(DateUtil.parse(firstAirDate))));
}

return StrUtil.blankToDefault(title, "");
});
} catch (Exception e) {
Expand Down

0 comments on commit b0f86bc

Please sign in to comment.