fix: process roms in consistent order (#2696)

This commit is contained in:
briaguya 2023-04-11 18:24:36 -04:00 committed by GitHub
parent fe71cdfbb6
commit 82b6c48497
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,17 +18,14 @@ def chooseROM(verbose=False, non_interactive=False):
return roms return roms
if non_interactive: if non_interactive:
romsToExtract = [] mq_rom = None
foundMq = False non_mq_rom = None
foundOot = False
for rom in roms: for rom in roms:
if rom.isMq and not foundMq: if rom.isMq and mq_rom is None:
romsToExtract.append(rom) mq_rom = rom
foundMq = True elif not rom.isMq and non_mq_rom is None:
elif not rom.isMq and not foundOot: non_mq_rom = rom
romsToExtract.append(rom) return [rom for rom in [non_mq_rom, mq_rom] if rom is not None]
foundOot = True
return romsToExtract
print(f"{len(roms)} roms found, please select one by pressing 1-{len(roms)}") print(f"{len(roms)} roms found, please select one by pressing 1-{len(roms)}")
print() print()