Updated sorting logic to remove special characters from game titles and correct handling of Roman numeral 'I'

This commit is contained in:
CosmicScale 2024-12-31 16:29:47 +00:00
parent 5bfd76b821
commit 64e6202091
2 changed files with 8 additions and 0 deletions

View File

@ -163,8 +163,12 @@ def sort_games_list(game_path):
# Normalize the title
normalized_title = normalize_text(first_field)
# Remove special characters
normalized_title = ''.join(c for c in normalized_title if c.isalnum() or c.isspace())
# Check for special cases like Roman numeral endings
replacements = {
' I': ' 1',
' II': ' 2',
' III': ' 3',
' IV': ' 4',

View File

@ -221,8 +221,12 @@ def sort_games_list(game_path):
# Normalize the title
normalized_title = normalize_text(first_field)
# Remove special characters
normalized_title = ''.join(c for c in normalized_title if c.isalnum() or c.isspace())
# Check for special cases like Roman numeral endings
replacements = {
' I': ' 1',
' II': ' 2',
' III': ' 3',
' IV': ' 4',