From e856130e19e691b0194b030f2eb74ad393b30be2 Mon Sep 17 00:00:00 2001 From: Krateng Date: Sat, 14 Dec 2019 16:02:39 +0100 Subject: [PATCH] Added more title cleanup --- maloja/cleanup.py | 4 ++++ maloja/data_files/settings/default.ini | 1 + 2 files changed, 5 insertions(+) diff --git a/maloja/cleanup.py b/maloja/cleanup.py index 5180a6d..3bc7cf3 100644 --- a/maloja/cleanup.py +++ b/maloja/cleanup.py @@ -121,6 +121,10 @@ class CleanerAgent: t = re.sub(r" \(originally by .*?\)","",t) t = re.sub(r" \(.*?Remaster.*?\)","",t) + for s in settings.get_settings("REMOVE_FROM_TITLE"): + if s in t: + t = t.replace(s,"").strip() + return t.strip() def parseTitleForArtists(self,t): diff --git a/maloja/data_files/settings/default.ini b/maloja/data_files/settings/default.ini index b3a069f..1bdd7ff 100644 --- a/maloja/data_files/settings/default.ini +++ b/maloja/data_files/settings/default.ini @@ -27,6 +27,7 @@ TRACK_SEARCH_PROVIDER = None DB_CACHE_SIZE = 8192 # how many MB on disk each database cache should have available. INVALID_ARTISTS = ["[Unknown Artist]","Unknown Artist","Spotify"] +REMOVE_FROM_TITLE = ["(Original Mix)","(Radio Edit)","(Album Version)"] [Local Images]