[utils] Split name on dashes for alias generation

This commit is contained in:
derrod 2021-10-05 07:15:33 +02:00
parent 02c83405fb
commit 82f38d279d

View file

@ -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))