mirror of
https://github.com/rommapp/romm.git
synced 2026-12-04 12:52:19 +01:00
always check IDs before updating
This commit is contained in:
@@ -440,32 +440,19 @@ async def scan_rom(
|
||||
fetch_playmatch_rom(),
|
||||
)
|
||||
|
||||
if newly_added:
|
||||
# Reversed to prioritize IGDB
|
||||
rom_attrs.update(
|
||||
{
|
||||
**playmatch_handler_rom,
|
||||
**ra_handler_rom,
|
||||
**launchbox_handler_rom,
|
||||
**moby_handler_rom,
|
||||
**ss_handler_rom,
|
||||
**igdb_handler_rom,
|
||||
}
|
||||
)
|
||||
else:
|
||||
# Only update fields if match is found
|
||||
if playmatch_handler_rom.get("igdb_id"):
|
||||
rom_attrs.update({**playmatch_handler_rom})
|
||||
if ra_handler_rom.get("ra_id"):
|
||||
rom_attrs.update({**ra_handler_rom})
|
||||
if moby_handler_rom.get("moby_id"):
|
||||
rom_attrs.update({**moby_handler_rom})
|
||||
if launchbox_handler_rom.get("launchbox_id"):
|
||||
rom_attrs.update({**launchbox_handler_rom})
|
||||
if ss_handler_rom.get("ss_id"):
|
||||
rom_attrs.update({**ss_handler_rom})
|
||||
if igdb_handler_rom.get("igdb_id"):
|
||||
rom_attrs.update({**igdb_handler_rom})
|
||||
# Only update fields if match is found
|
||||
if playmatch_handler_rom.get("igdb_id"):
|
||||
rom_attrs.update({**playmatch_handler_rom})
|
||||
if ra_handler_rom.get("ra_id"):
|
||||
rom_attrs.update({**ra_handler_rom})
|
||||
if moby_handler_rom.get("moby_id"):
|
||||
rom_attrs.update({**moby_handler_rom})
|
||||
if launchbox_handler_rom.get("launchbox_id"):
|
||||
rom_attrs.update({**launchbox_handler_rom})
|
||||
if ss_handler_rom.get("ss_id"):
|
||||
rom_attrs.update({**ss_handler_rom})
|
||||
if igdb_handler_rom.get("igdb_id"):
|
||||
rom_attrs.update({**igdb_handler_rom})
|
||||
|
||||
# If not found in any metadata source, we return the rom with the default values
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user