From 82f38d279dd7ea19a091563ca234be93f47aa7a3 Mon Sep 17 00:00:00 2001 From: derrod Date: Tue, 5 Oct 2021 07:15:33 +0200 Subject: [PATCH] [utils] Split name on dashes for alias generation --- legendary/utils/aliasing.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/legendary/utils/aliasing.py b/legendary/utils/aliasing.py index c66578a..20457d8 100644 --- a/legendary/utils/aliasing.py +++ b/legendary/utils/aliasing.py @@ -63,6 +63,8 @@ def generate_aliases(game_name, game_folder=None, split_words=True): # remove subtitle from game if ':' in game_name: _aliases.extend(generate_aliases(game_name.partition(':')[0])) + if '-' in game_name: + _aliases.extend(generate_aliases(game_name.replace('-', ' '))) # include folder name for alternative short forms if game_folder: _aliases.extend(generate_aliases(game_folder, split_words=False))