From 20d730e12e9b4e359054740949b7c04a5d597319 Mon Sep 17 00:00:00 2001 From: Papa Date: Sun, 19 Nov 2023 19:46:51 -0700 Subject: [PATCH] Replace author name in track title in VEVO tracks --- packages/runtime-website/src/music/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-website/src/music/utils.ts b/packages/runtime-website/src/music/utils.ts index ef6f6b7c..53694d59 100644 --- a/packages/runtime-website/src/music/utils.ts +++ b/packages/runtime-website/src/music/utils.ts @@ -84,7 +84,7 @@ const common = { const trackNameMatch = trackNameRegex.exec(track.title) if (authorNameMatch) { - title = track.title?.replace(replaceExtraneousRegex, "")?.trim() + title = track.title?.replace(new RegExp(`${authorNameMatch[1]} - ?`), "")?.replace(replaceExtraneousRegex, "")?.trim() artist = authorNameMatch[1]?.trim() confidence = 2 } else if (trackNameMatch) {