Skip to content

Commit

Permalink
Change game title from " - " to ": "
Browse files Browse the repository at this point in the history
  • Loading branch information
LaundroMat committed Aug 31, 2015
1 parent 3d3ddaf commit e0e8c71
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion parsers/tosec_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import re
import logging
from . import constants
from core.helpers.string_ops import transform_tosec_game_title_to_readable
from tosecparser.parsers.offlinelist_no_intro_xml_parser import XMLDatFileParser

LOGGER = logging.getLogger(__name__)
Expand All @@ -18,7 +19,7 @@ def parse(self):
game['details'] = TosecNamingConvention(game_element.get('name'))

game['tosec_name'] = game_element.get('name')
game['title'] = game['details'].title
game['title'] = transform_tosec_game_title_to_readable(game['details'].title)
game['publisher'] = game['details'].publisher
year = game['details'].date.split('-')[0] if game['details'].date else None
try:
Expand Down Expand Up @@ -189,6 +190,9 @@ def __init__(self, name):
dump_flags = [d[1:-1] for d in re.split(r'(\[.*?\])', dump_part) if d]
self.set_dump_flags(dump_flags)

# Remove Rev PRG\d. from title
self.title = re.sub('Rev PRG\d*$', '', self.title)

def set_flags(self, flags):
current_flag_index = self.parts.index('publisher') + 1
for flag in flags:
Expand Down

0 comments on commit e0e8c71

Please sign in to comment.