From b0f86bc010acd39fba08ef2e6d714a5abe8a57f1 Mon Sep 17 00:00:00 2001 From: wushuo Date: Sun, 15 Dec 2024 09:31:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96tmdb=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/ani/rss/util/TmdbUtil.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/ani/rss/util/TmdbUtil.java b/src/main/java/ani/rss/util/TmdbUtil.java index a2ef55ff..a7f06eac 100644 --- a/src/main/java/ani/rss/util/TmdbUtil.java +++ b/src/main/java/ani/rss/util/TmdbUtil.java @@ -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) {