From f284ef2fba2aadfa7227372d9d08bfbc8028b622 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 20 May 2026 19:14:35 +0000 Subject: [PATCH] fix: treat libretro-matched roms as identified Agent-Logs-Url: https://github.com/rommapp/romm/sessions/9cc2e55e-af48-40bd-b2e9-492b6fd6046a Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com> --- backend/models/rom.py | 1 + backend/tests/models/test_rom.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/backend/models/rom.py b/backend/models/rom.py index 4baf855c2..95a077dc5 100644 --- a/backend/models/rom.py +++ b/backend/models/rom.py @@ -373,6 +373,7 @@ class Rom(BaseModel): and not self.flashpoint_id and not self.hltb_id and not self.gamelist_id + and not self.libretro_id ) @property diff --git a/backend/tests/models/test_rom.py b/backend/tests/models/test_rom.py index e65d4b4c0..07808e85f 100644 --- a/backend/tests/models/test_rom.py +++ b/backend/tests/models/test_rom.py @@ -4,3 +4,10 @@ from models.rom import Rom def test_rom(rom: Rom): assert rom.fs_path == "test_platform_slug/roms" assert rom.full_path == "test_platform_slug/roms/test_rom.zip" + + +def test_rom_with_libretro_match_is_identified(rom: Rom): + rom.libretro_id = "abc123" + + assert rom.is_unidentified is False + assert rom.is_identified is True