fix: keep recalbox notes its own

This commit is contained in:
Abdessamad Derraz committed 2026-10-06 05:00:36 +02:00
1 parent 82583fe17a
commit 623b0a6d47
2 files changed
+11 -1

No files matched your search

+3 -1
View File
@@ -84,7 +84,9 @@ class Exporter(BaseExporter):
elif hash_match is True:
attrs.append('hashMatchMandatory="true"')
note = " ".join(str(fe.native("note", "")).split())
# The platform's own note only: ours is prose about our profiles, with
# file:line citations, and the format does not carry note corrections.
note = " ".join(str((fe.platform or {}).get("note") or "").split())
if note:
attrs.append(f"note={quoteattr(note)}")
+8
View File
@@ -169,5 +169,13 @@ class OneFileOneIdentity(unittest.TestCase):
declared = next(f for f in systems["dc"].files if f.platform is not None)
self.assertIsNone(declared.truth)
class RecalboxKeepsItsOwnNotes(unittest.TestCase):
def test_no_profile_prose_reaches_a_note(self):
from exporter.recalbox_exporter import Exporter as Recalbox
fe = NativeFile("bios.bin", "bios.bin", "psx", platform={"md5": A},
truth={"md5": A, "note": "Loaded at libretro.c:120"})
self.assertNotIn("note=", Recalbox()._bios_element(fe, "psx"))
if __name__ == "__main__":
unittest.main()