@@ -9464,16 +9464,16 @@ def _roms_import_roms(self, launcherID):
94649464
94659465 # --- Open ROM scanner report file ---
94669466 launcher_report_FN = g_PATHS.REPORTS_DIR.pjoin(launcher['roms_base_noext'] + '_report.txt')
9467- log_info('Report file OP "{0 }"'.format(launcher_report_FN.getOriginalPath()))
9468- log_info('Report file P "{0 }"'.format(launcher_report_FN.getPath()))
9467+ log_info('Report file OP "{}"'.format(launcher_report_FN.getOriginalPath()))
9468+ log_info('Report file P "{}"'.format(launcher_report_FN.getPath()))
94699469 report_fobj = open(launcher_report_FN.getPath(), "w")
94709470 report_fobj.write('*** Starting ROM scanner ... ***\n'.format())
9471- report_fobj.write('Launcher name "{0 }"\n'.format(launcher['m_name']))
9472- report_fobj.write('Launcher ID "{0 }"\n'.format(launcher['id']))
9473- report_fobj.write('ROM path "{0 }"\n'.format(rom_path.getPath()))
9474- report_fobj.write('ROM ext "{0 }"\n'.format(launcher_exts))
9475- report_fobj.write('ROM extra path "{0 }"\n'.format(rom_extra_path.getPath()))
9476- report_fobj.write('Platform "{0 }"\n'.format(launcher['platform']))
9471+ report_fobj.write('Launcher name "{}"\n'.format(launcher['m_name']))
9472+ report_fobj.write('Launcher ID "{}"\n'.format(launcher['id']))
9473+ report_fobj.write('ROM path "{}"\n'.format(rom_path.getPath()))
9474+ report_fobj.write('ROM ext "{}"\n'.format(launcher_exts))
9475+ report_fobj.write('ROM extra path "{}"\n'.format(rom_extra_path.getPath()))
9476+ report_fobj.write('Platform "{}"\n'.format(launcher['platform']))
94779477
94789478 # Check if there is an XML for this launcher. If so, load it.
94799479 # If file does not exist or is empty then return an empty dictionary.
@@ -9494,14 +9494,17 @@ def _roms_import_roms(self, launcherID):
94949494 # Check if scraper is ready for operation. Otherwise disable it internally.
94959495 scraper_strategy.scanner_check_before_scraping()
94969496
9497+ # Create ROMFilter object. Loads filter databases for MAME.
9498+ romfilter = FilterROM(g_PATHS, self.settings, launcher['platform'])
9499+
94979500 # --- Assets/artwork stuff ----------------------------------------------------------------
94989501 # Ensure there is no duplicate asset dirs. Abort scanning of assets if duplicate dirs found.
94999502 log_debug('Checking for duplicated artwork directories...')
95009503 duplicated_name_list = asset_get_duplicated_dir_list(launcher)
95019504 if duplicated_name_list:
95029505 duplicated_asset_srt = ', '.join(duplicated_name_list)
9503- log_info('Duplicated asset dirs: {0 }'.format(duplicated_asset_srt))
9504- kodi_dialog_OK('Duplicated asset directories: {0 }. '.format(duplicated_asset_srt) +
9506+ log_info('Duplicated asset dirs: {}'.format(duplicated_asset_srt))
9507+ kodi_dialog_OK('Duplicated asset directories: {}. '.format(duplicated_asset_srt) +
95059508 'Change asset directories before continuing.')
95069509 return
95079510 else:
@@ -9513,7 +9516,7 @@ def _roms_import_roms(self, launcherID):
95139516 if scraper_strategy.unconfigured_name_list:
95149517 unconfigured_asset_srt = ', '.join(scraper_strategy.unconfigured_name_list)
95159518 kodi_dialog_OK(
9516- 'Assets directories not set: {0 }. '.format(unconfigured_asset_srt) +
9519+ 'Assets directories not set: {}. '.format(unconfigured_asset_srt) +
95179520 'Asset scanner will be disabled for this/those.')
95189521
95199522 # --- Create a cache of assets ---
@@ -9703,12 +9706,9 @@ def _roms_import_roms(self, launcherID):
97039706 report_fobj.write(' File not in launcher ROM list. Processing it ...\n')
97049707
97059708 # --- Ignore BIOS ROMs ---
9706- # Name of bios is: '[BIOS] Rom name example (Rev A).zip'
9707- if self.settings['scan_ignore_bios']:
9708- BIOS_re = re.findall('\[BIOS\]', ROM.getBase())
9709- if len(BIOS_re) > 0:
9710- log_info("BIOS detected. Skipping ROM '{0}'".format(ROM.path))
9711- continue
9709+ if romfilter.ROM_is_filtered(ROM.getBase()):
9710+ log_debug('ROM filtered.')
9711+ continue
97129712
97139713 # --- Create new ROM and process metadata and assets ---------------------------------
97149714 romdata = fs_new_rom()
0 commit comments