mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Added fixartists rule
This commit is contained in:
parent
137da60ab9
commit
a6724b9455
@ -20,6 +20,7 @@ class CleanerAgent:
|
||||
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_addartists = {c.lower():(b.lower(),d) for [a,b,c,d] in raw if a=="addartists"}
|
||||
self.rules_fixartists = {c.lower():b for [a,b,c,d] in raw if a=="fixartists"}
|
||||
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_regextitle = [[b,c] for [a,b,c,d] in raw if a=="regextitle"]
|
||||
@ -38,7 +39,6 @@ class CleanerAgent:
|
||||
self.checksums = utilities.checksumTSV(datadir("rules"))
|
||||
|
||||
|
||||
|
||||
def fullclean(self,artist,title):
|
||||
artists = self.parseArtists(self.removespecial(artist))
|
||||
title = self.parseTitle(self.removespecial(title))
|
||||
@ -50,6 +50,11 @@ class CleanerAgent:
|
||||
allartists = allartists.split("␟")
|
||||
if set(reqartists).issubset(set(a.lower() for a in artists)):
|
||||
artists += allartists
|
||||
elif title.lower() in self.rules_fixartists:
|
||||
allartists = self.rules_fixartists[title.lower()]
|
||||
allartists = allartists.split("␟")
|
||||
if len(set(a.lower() for a in allartists) & set(a.lower() for a in artists)) > 0:
|
||||
artists = allartists
|
||||
artists = list(set(artists))
|
||||
artists.sort()
|
||||
|
||||
|
29
maloja/data_files/rules/predefined/krateng_masseffect.tsv
Normal file
29
maloja/data_files/rules/predefined/krateng_masseffect.tsv
Normal file
@ -0,0 +1,29 @@
|
||||
# NAME: Mass Effect Soundtrack
|
||||
# DESC: Sets correct artists for the Mass Effect soundtracks
|
||||
|
||||
# 1
|
||||
fixartists Jack Wall␟Sam Hulick Mass Effect Theme
|
||||
fixartists Richard Jacques␟Jack Wall␟Sam Hulick Spectre Induction
|
||||
fixartists Richard Jacques␟Jack Wall␟Sam Hulick The Citadel
|
||||
fixartists Richard Jacques␟Jack Wall The Thorian
|
||||
fixartists Richard Jacques␟Jack Wall␟Sam Hulick The Alien Queen
|
||||
fixartists Jack Wall␟Sam Hulick Breeding Ground
|
||||
fixartists Jack Wall␟Sam Hulick In Pursuit of Saren
|
||||
fixartists David Kates␟Jack Wall␟Sam Hulick Infusion
|
||||
fixartists David Kates␟Jack Wall␟Sam Hulick Final Assault
|
||||
|
||||
# 2
|
||||
fixartists Jack Wall␟David Kates Thane
|
||||
fixartists Jack Wall␟Sam Hulick The Normandy Attacked
|
||||
fixartists Jack Wall␟Brian DiDomenico The Collector Base
|
||||
fixartists Jack Wall␟Sam Hulick New Worlds
|
||||
|
||||
# 3
|
||||
fixartists Sascha Dikiciyan␟Cris Velasco The Ardat-Yakshi
|
||||
fixartists Sascha Dikiciyan␟Cris Velasco Rannoch
|
||||
fixartists Sascha Dikiciyan␟Cris Velasco I'm Sorry
|
||||
fixartists Sascha Dikiciyan␟Cris Velasco The Scientists
|
||||
fixartists Sascha Dikiciyan␟Cris Velasco Aralakh Company
|
||||
fixartists Sascha Dikiciyan␟Cris Velasco Prothean Beacon
|
||||
fixartists Sascha Dikiciyan␟Cris Velasco Reaper Chase
|
||||
fixartists Clint Mansell␟Sam Hulick An End, Once and For All
|
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
|
||||
Third column is the song title
|
||||
Fourth column are artists that shoud be added, separated by ␟
|
||||
fixartists Similar as above, but simply specifies that if any of the given artists is present, all (and no others) should be present
|
||||
Second column is correct artists
|
||||
Third column is the song title
|
||||
artistintitle Defines title strings that imply the presence of another artist.
|
||||
Second column is the string
|
||||
Third column is the artist or artists
|
||||
|
Loading…
Reference in New Issue
Block a user