Skip to content

Commit 2f7d222

Browse files
Honour setting scan_ignore_bio.
1 parent 38e0ad5 commit 2f7d222

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

resources/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9706,8 +9706,8 @@ def _roms_import_roms(self, launcherID):
97069706
report_fobj.write(' File not in launcher ROM list. Processing it ...\n')
97079707

97089708
# --- Ignore BIOS ROMs ---
9709-
if romfilter.ROM_is_filtered(ROM.getBase()):
9710-
log_debug('ROM filtered.')
9709+
if romfilter.ROM_is_filtered(ROM.getBaseNoExt()):
9710+
log_debug('ROM filtered. Skipping ROM processing.')
97119711
continue
97129712

97139713
# --- Create new ROM and process metadata and assets ---------------------------------

resources/scrap.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ def _load_JSON(self, filename):
171171

172172
# Returns True if ROM is filtered, False otherwise.
173173
def ROM_is_filtered(self, basename):
174+
log_debug('FilterROM::ROM_is_filtered() Testing "{}"'.format(basename))
175+
if not self.settings['scan_ignore_bios']:
176+
log_debug('FilterROM::ROM_is_filtered() Filters disabled. Return False.')
177+
return False
178+
174179
if self.platform == PLATFORM_MAME_LONG:
175180
if basename in self.BIOS_set:
176181
log_debug('FilterROM::ROM_is_filtered() Filtered MAME BIOS "{}"'.format(basename))

resources/utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -998,15 +998,19 @@ def getDir(self):
998998
def getBase(self):
999999
return os.path.basename(self.path)
10001000

1001+
# Deprecated method name.
10011002
def getBase_noext(self):
10021003
basename = os.path.basename(self.path)
10031004
root, ext = os.path.splitext(basename)
1004-
1005+
return root
1006+
1007+
def getBaseNoExt(self):
1008+
basename = os.path.basename(self.path)
1009+
root, ext = os.path.splitext(basename)
10051010
return root
10061011

10071012
def getExt(self):
10081013
root, ext = os.path.splitext(self.path)
1009-
10101014
return ext
10111015

10121016
# ---------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)