Removing paranthesis from title

This commit is contained in:
matthias@arch 2021-09-29 16:51:59 +02:00
parent 4451ec7c29
commit 3292eca067

View File

@ -90,17 +90,17 @@ class Nicole:
title = title.casefold()
# remove 'a' or 'the' from the artist
if artist[0:1] == "a ":
if artist[0:2] == "a ":
artist = artist[2:]
elif artist[0:4] == "the ":
artist = artist[4:]
# remove anything in square bracketrs (eg [Explicit])
for match in re.finditer(r"[.*]", title):
for match in re.finditer(r"\[.*\]", title):
title = title.replace(match.group(), "")
# remove spaces, from the title
for c in [' ', '-', ',', '.', '\'', '"', '°', '`', '´', '/', '!', '?', '#', '*']:
for c in [' ', '-', ',', '.', '\'', '"', '°', '`', '´', '/', '!', '?', '#', '*', '(', ')']:
title = title.replace(c, '')
artist = artist.replace(c, '')