From 86123456f2ff577921cf62cffca180427dfe1dd5 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Sun, 18 Feb 2024 21:11:28 +0600 Subject: [PATCH] fix: cleanTitle removing feat and ft from words instead of whole words --- lib/utils/service_utils.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/utils/service_utils.dart b/lib/utils/service_utils.dart index 9e3b5893..4d9d1e67 100644 --- a/lib/utils/service_utils.dart +++ b/lib/utils/service_utils.dart @@ -53,9 +53,9 @@ abstract class ServiceUtils { return "$title ${artists.map((e) => e.replaceAll(",", " ")).join(", ")}" .toLowerCase() - .replaceAll(RegExp(" *\\[[^\\]]*]"), '') - .replaceAll(RegExp("feat.|ft."), '') - .replaceAll(RegExp("\\s+"), ' ') + .replaceAll(RegExp(r"\s*\[[^\]]*]"), ' ') + .replaceAll(RegExp(r"\sfeat\.|\sft\."), ' ') + .replaceAll(RegExp(r"\s+"), ' ') .trim(); }