mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Added artistintitle rules
This commit is contained in:
parent
a6b1a8a144
commit
5d066d9b26
@ -7,7 +7,7 @@ author = {
|
|||||||
"email":"maloja@krateng.dev",
|
"email":"maloja@krateng.dev",
|
||||||
"github": "krateng"
|
"github": "krateng"
|
||||||
}
|
}
|
||||||
version = 2,0,13
|
version = 2,0,14
|
||||||
versionstr = ".".join(str(n) for n in version)
|
versionstr = ".".join(str(n) for n in version)
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ class CleanerAgent:
|
|||||||
self.rules_replaceartist = {b.lower():c for [a,b,c,d] in raw if a=="replaceartist"}
|
self.rules_replaceartist = {b.lower():c for [a,b,c,d] in raw if a=="replaceartist"}
|
||||||
self.rules_ignoreartist = [b.lower() for [a,b,c,d] in raw if a=="ignoreartist"]
|
self.rules_ignoreartist = [b.lower() for [a,b,c,d] in raw if a=="ignoreartist"]
|
||||||
self.rules_addartists = {c.lower():(b.lower(),d) for [a,b,c,d] in raw if a=="addartists"}
|
self.rules_addartists = {c.lower():(b.lower(),d) for [a,b,c,d] in raw if a=="addartists"}
|
||||||
|
self.rules_artistintitle = {b.lower():c for [a,b,c,d] in raw if a=="artistintitle"}
|
||||||
#self.rules_regexartist = [[b,c] for [a,b,c,d] in raw if a=="regexartist"]
|
#self.rules_regexartist = [[b,c] for [a,b,c,d] in raw if a=="regexartist"]
|
||||||
#self.rules_regextitle = [[b,c] for [a,b,c,d] in raw if a=="regextitle"]
|
#self.rules_regextitle = [[b,c] for [a,b,c,d] in raw if a=="regextitle"]
|
||||||
# TODO
|
# TODO
|
||||||
@ -137,7 +138,10 @@ class CleanerAgent:
|
|||||||
artists += self.parseArtists(re.sub(r"(.*) " + d + " (.*).*",r"\2",t))
|
artists += self.parseArtists(re.sub(r"(.*) " + d + " (.*).*",r"\2",t))
|
||||||
return (title,artists)
|
return (title,artists)
|
||||||
|
|
||||||
return (t,[])
|
artists = []
|
||||||
|
for st in self.rules_artistintitle:
|
||||||
|
if st in t.lower(): artists += self.rules_artistintitle[st].split("␟")
|
||||||
|
return (t,artists)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -156,3 +156,8 @@ replacetitle 벌써 12시 Gotta Go Gotta Go
|
|||||||
|
|
||||||
# ITZY
|
# ITZY
|
||||||
replacetitle 달라달라 (DALLA DALLA) Dalla Dalla
|
replacetitle 달라달라 (DALLA DALLA) Dalla Dalla
|
||||||
|
|
||||||
|
|
||||||
|
# Popular Remixes
|
||||||
|
artistintitle Areia Remix Areia
|
||||||
|
artistintitle Areia Kpop Areia
|
||||||
|
Can't render this file because it has a wrong number of fields in line 5.
|
@ -20,6 +20,9 @@ The first column defines the type of the rule:
|
|||||||
Second column is artists that need to be already present for this rule to apply
|
Second column is artists that need to be already present for this rule to apply
|
||||||
Third column is the song title
|
Third column is the song title
|
||||||
Fourth column are artists that shoud be added, separated by ␟
|
Fourth column are artists that shoud be added, separated by ␟
|
||||||
|
artistintitle Defines title strings that imply the presence of another artist.
|
||||||
|
Second column is the string
|
||||||
|
Third column is the artist or artists
|
||||||
|
|
||||||
Rules in non-tsv files are ignored. '#' is used for comments. Additional columns are ignored. To have a '#' in a name, use '\num'
|
Rules in non-tsv files are ignored. '#' is used for comments. Additional columns are ignored. To have a '#' in a name, use '\num'
|
||||||
Comments are not supported in scrobble lists, but you probably never edit these manually anyway.
|
Comments are not supported in scrobble lists, but you probably never edit these manually anyway.
|
||||||
@ -35,3 +38,4 @@ replaceartist Dal Shabet Dal★Shabet
|
|||||||
replaceartist Mr FijiWiji, AgNO3 Mr FijiWiji␟AgNO3 # one artist is replaced by two artists
|
replaceartist Mr FijiWiji, AgNO3 Mr FijiWiji␟AgNO3 # one artist is replaced by two artists
|
||||||
countas Trouble Maker HyunA
|
countas Trouble Maker HyunA
|
||||||
addartists HyunA Change Jun Hyung
|
addartists HyunA Change Jun Hyung
|
||||||
|
artistintitle Areia Remix Areia
|
||||||
|
Loading…
x
Reference in New Issue
Block a user