1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Improved artist fixing (hopefully)

This commit is contained in:
Krateng 2020-11-15 20:19:29 +01:00
parent 755567549c
commit 034bd064f1
2 changed files with 9 additions and 7 deletions

View File

@ -5,7 +5,7 @@ author = {
"email":"maloja@krateng.dev",
"github": "krateng"
}
version = 2,10,4
version = 2,10,5
versionstr = ".".join(str(n) for n in version)
links = {
"pypi":"malojaserver",

View File

@ -94,12 +94,7 @@ class CleanerAgent:
return self.parseArtists(re.sub(r"(.*) \(" + d + " (.*)\)",r"\1",a)) + \
self.parseArtists(re.sub(r"(.*) \(" + d + " (.*)\)",r"\2",a))
for d in self.delimiters_formal:
if (d in a):
ls = []
for i in a.split(d):
ls += self.parseArtists(i)
return ls
for d in (self.delimiters_feat + self.delimiters):
if ((" " + d + " ") in a):
@ -108,6 +103,13 @@ class CleanerAgent:
ls += self.parseArtists(i)
return ls
for d in self.delimiters_formal:
if (d in a):
ls = []
for i in a.split(d):
ls += self.parseArtists(i)
return ls