Merge pull request #584 from Araxeus/fix-lyrics

fix various lyrics issues
This commit is contained in:
th-ch
2022-02-10 00:07:33 +01:00
committed by GitHub
3 changed files with 64 additions and 27 deletions

View File

@ -112,13 +112,12 @@ const suffixesToRemove = [
" - topic",
"vevo",
" (performance video)",
" (official music video)",
" (official video)",
" (clip officiel)",
];
function cleanupName(name) {
if (!name) return name;
name = name.replace(/\((?:official)?[ ]?(?:music)?[ ]?(?:lyric[s]?)?[ ]?(?:video)?\)$/i, '')
const lowCaseName = name.toLowerCase();
for (const suffix of suffixesToRemove) {
if (lowCaseName.endsWith(suffix)) {