fix: cleanTitle removing feat and ft from words instead of whole words

This commit is contained in:
Kingkor Roy Tirtho 2024-02-18 21:11:28 +06:00
parent 9f9244062a
commit 86123456f2

View File

@ -53,9 +53,9 @@ abstract class ServiceUtils {
return "$title ${artists.map((e) => e.replaceAll(",", " ")).join(", ")}" return "$title ${artists.map((e) => e.replaceAll(",", " ")).join(", ")}"
.toLowerCase() .toLowerCase()
.replaceAll(RegExp(" *\\[[^\\]]*]"), '') .replaceAll(RegExp(r"\s*\[[^\]]*]"), ' ')
.replaceAll(RegExp("feat.|ft."), '') .replaceAll(RegExp(r"\sfeat\.|\sft\."), ' ')
.replaceAll(RegExp("\\s+"), ' ') .replaceAll(RegExp(r"\s+"), ' ')
.trim(); .trim();
} }