mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[utils] Split name on dashes for alias generation
This commit is contained in:
parent
02c83405fb
commit
82f38d279d
|
@ -63,6 +63,8 @@ def generate_aliases(game_name, game_folder=None, split_words=True):
|
||||||
# remove subtitle from game
|
# remove subtitle from game
|
||||||
if ':' in game_name:
|
if ':' in game_name:
|
||||||
_aliases.extend(generate_aliases(game_name.partition(':')[0]))
|
_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
|
# include folder name for alternative short forms
|
||||||
if game_folder:
|
if game_folder:
|
||||||
_aliases.extend(generate_aliases(game_folder, split_words=False))
|
_aliases.extend(generate_aliases(game_folder, split_words=False))
|
||||||
|
|
Loading…
Reference in a new issue