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

How tf did that even happen

This commit is contained in:
krateng 2021-12-22 07:21:06 +01:00
parent 2b55e3a7c9
commit 0ccd39ffd9
2 changed files with 5 additions and 5 deletions

View File

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

View File

@ -65,10 +65,10 @@ class CleanerAgent:
delimiters_feat = malojaconfig["DELIMITERS_FEAT"] delimiters_feat = malojaconfig["DELIMITERS_FEAT"]
#Delimiters in informal artist strings, spaces expected around them #Delimiters in informal artist strings, spaces expected around them
#delimiters = ["vs.","vs","&"] #delimiters = ["vs.","vs","&"]
delimiters = malojaconfig["DELIMITERS_FEAT"] delimiters = malojaconfig["DELIMITERS_INFORMAL"]
#Delimiters used specifically to tag multiple artists when only one tag field is available, no spaces used #Delimiters used specifically to tag multiple artists when only one tag field is available, no spaces used
#delimiters_formal = ["; ",";","/"] #delimiters_formal = ["; ",";","/"]
delimiters_formal = malojaconfig["DELIMITERS_FEAT"] delimiters_formal = malojaconfig["DELIMITERS_FORMAL"]
def parseArtists(self,a): def parseArtists(self,a):
@ -76,7 +76,7 @@ class CleanerAgent:
res = [self.parseArtists(art) for art in a] res = [self.parseArtists(art) for art in a]
return [a for group in res for a in group] return [a for group in res for a in group]
if a.strip() in malojaconfig["DELIMITERS_FEAT"]: if a.strip() in malojaconfig["INVALID_ARTISTS"]:
return [] return []
if a.strip().lower() in self.rules_ignoreartist: if a.strip().lower() in self.rules_ignoreartist:
@ -135,7 +135,7 @@ class CleanerAgent:
t = re.sub(r" \(originally by .*?\)","",t) t = re.sub(r" \(originally by .*?\)","",t)
t = re.sub(r" \(.*?Remaster.*?\)","",t) t = re.sub(r" \(.*?Remaster.*?\)","",t)
for s in malojaconfig["DELIMITERS_FEAT"]: for s in malojaconfig["REMOVE_FROM_TITLE"]:
if s in t: if s in t:
t = t.replace(s,"") t = t.replace(s,"")