From 007184031be9b317857efb7ac0233a61491d5369 Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Mon, 14 Nov 2022 15:13:19 +0800 Subject: [PATCH] =?UTF-8?q?fix=E6=96=B0=E5=A2=9E=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E7=BA=AF=E9=9F=B3=E4=B9=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/yutou/nas/Controllers/MusicController.java | 2 +- .../java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/yutou/nas/Controllers/MusicController.java b/src/main/java/com/yutou/nas/Controllers/MusicController.java index 685c9f6..7d279b7 100644 --- a/src/main/java/com/yutou/nas/Controllers/MusicController.java +++ b/src/main/java/com/yutou/nas/Controllers/MusicController.java @@ -170,7 +170,7 @@ public class MusicController { } List list = musicTools.getMusicList(true); if(_fieldName) { - list.removeIf(data -> data.getTitle().contains("instrumental")); + list.removeIf(data -> data.getTitle().toLowerCase().contains("instrumental")); } MusicData data = list.get(Tools.randomCommon(0, list.size() - 1, 1)[0]); JSONObject json = new JSONObject(); diff --git a/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java b/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java index 3df25ba..326c6bf 100644 --- a/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java +++ b/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java @@ -156,7 +156,7 @@ public class MusicToolsServiceImpl implements IMusicToolsService { return compare.compare(o1.getTitle(), o2.getTitle()); }); if (filter) { - list.removeIf(data -> data.getTitle().contains("instrumental")); + list.removeIf(data -> data.getTitle().toLowerCase().contains("instrumental")); } return list; }