#647 genre_mapping fix

pull/652/head
meisnate12 3 years ago
parent 3fecc7798e
commit 2120315c01

@ -658,8 +658,11 @@ class ConfigFile:
if lib["operations"]["genre_mapper"] and isinstance(lib["operations"]["genre_mapper"], dict): if lib["operations"]["genre_mapper"] and isinstance(lib["operations"]["genre_mapper"], dict):
params["genre_mapper"] = {} params["genre_mapper"] = {}
for new_genre, old_genres in lib["operations"]["genre_mapper"].items(): for new_genre, old_genres in lib["operations"]["genre_mapper"].items():
for old_genre in util.get_list(old_genres, split=False): for old_genre in util.get_list(old_genres):
params["genre_mapper"][old_genre] = new_genre if old_genre == new_genre:
logger.error("Config Error: genres cannot be mapped to themselves")
else:
params["genre_mapper"][old_genre] = new_genre
else: else:
logger.error("Config Error: genre_mapper is blank") logger.error("Config Error: genre_mapper is blank")
if "genre_collections" in lib["operations"]: if "genre_collections" in lib["operations"]:

Loading…
Cancel
Save