Exemplo n.º 1
0
    def gameFileFromRow(self, row, game):
        game_file = GameFile(row['file_link'], game=game, source='wos')
        game_file.size_zipped = row['file_size']
        game_file.setMachineType(row['machine_type'])
        game_file.setProtectionScheme(row['protection_scheme'])
        if row['file_language']:
            if row['file_language'] in IDIOM_IDS_TO_TOSEC_LANGS:
                game_file.setLanguage(
                    IDIOM_IDS_TO_TOSEC_LANGS[row['file_language']])
            else:
                game_file.setLanguage(row['file_language'])
        if row['file_version'] and row['file_version'].lower().startswith('v') \
                and row['file_version'][1].isdigit():
            game_file.content_desc = ' ' + remove_brackets_regex.sub(
                '', row['file_version']).strip()

        return game_file
Exemplo n.º 2
0
 def fileFromRow(self, row):
     if not row['md5']:
         return None
     file = GameFile()
     if 'wos_name' in row.keys():
         file.wos_name = row['wos_name']
         file.wos_path = row['wos_path']
     if 'tosec_path' in row.keys():
         file.tosec_path = row['tosec_path']
     file.format = row['format']
     file.size = row['size']
     file.content_desc = row['content_desc']
     file.release_date = row['release_date']
     file.is_demo = row['is_demo']
     file.setMachineType(row['file_machine_type'])
     file.part = row['part']
     file.side = row['side']
     file.language = row['file_language']
     file.mod_flags = row['mod_flags']
     file.notes = row['notes']
     file.md5 = row['md5']
     file.crc32 = row['crc32']
     file.sha1 = row['sha1']
     return file