From 08c17cab00dfe4d0acec436cbadfdb9932d340f0 Mon Sep 17 00:00:00 2001 From: Krateng Date: Tue, 4 Dec 2018 19:17:44 +0100 Subject: [PATCH] Fixed some parsing logic --- cleanup.py | 2 +- rules/rules.info | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cleanup.py b/cleanup.py index b871642..906e4f8 100644 --- a/cleanup.py +++ b/cleanup.py @@ -30,7 +30,7 @@ class CleanerAgent: delimiters_feat = ["ft.","ft","feat.","feat","featuring","Ft.","Ft","Feat.","Feat","Featuring"] #Delimiters used for extra artists, even when in the title field delimiters = ["vs.","vs","&"] #Delimiters in informal artist strings, spaces expected around them - delimiters_formal = ["; ",";"] #Delimiters used specifically to tag multiple artists when only one tag field is available, no spaces used + delimiters_formal = ["; ",";","/"] #Delimiters used specifically to tag multiple artists when only one tag field is available, no spaces used def parseArtists(self,a): diff --git a/rules/rules.info b/rules/rules.info index ca9ae39..1ffc394 100644 --- a/rules/rules.info +++ b/rules/rules.info @@ -4,11 +4,13 @@ The first column defines the type of the rule: notanartist Defines strings that can appear behind "feat" in a song title, but denote additional information about the track instead of another artist. Second column is the string belongtogether Defines an artist with an ampersand or other delimiter in their name. Otherwise, the artist string will be interpreted as two different artists (except when there are no spaces). + This artist will be accepted without further parsing. If you want to replace the spelling, you need a replaceartist entry instead Second column is the full name of the artist replacetitle Defines an alternative spelling of a track title that should be replaced. Second column is the 'wrong' spelling Third column the correct spelling replaceartist Defines and alternative spelling of an artist that should be replaced + Any artist mentioned here will automatically be replaced, there is no need for a separate belongtogether entry Second column is the 'wrong' spelling Third column the correct spelling. Use ␟ if the spelling should correct to several artists countas Defines an artist that should be counted together with another artist for chart statistics etc. @@ -23,7 +25,9 @@ An example file could look like this: notanartist In Dreams belongtogether Darth & Vader +belongtogether AC/DC # / and ; separate even when there are no spaces, so make sure to add artists with those symbols replacetitle 첫 사랑니 (Rum Pum Pum Pum) Rum Pum Pum Pum replaceartist Dal Shabet Dal★Shabet -replaceartist Stephen Rippy/Kevin McMullan Stephen Rippy␟Kevin McMullan +replaceartist Mr FijiWiji, AgNO3 Mr FijiWiji␟AgNO3 # one artist is replaced by two artists +replaceartist Selena Gomez & the Scene Selena Gomez & The Scene # note how there is a &, but we do not need an extra belongtogether entry. countas Trouble Maker HyunA