mirror of
https://github.com/rommapp/romm.git
synced 2026-12-06 15:54:45 +01:00
refactor(export): trim the gamelist media comments to the non-obvious why
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
475abfbcc2
commit
5bce157765
3 files changed
+4
-10
No files matched your search
@@ -52,8 +52,7 @@ DEFAULT_EXCLUDED_FILES: Final = [
|
||||
"gamelist.xml",
|
||||
"metadata.pegasus.txt",
|
||||
]
|
||||
# ES-DE ignores media paths in gamelist.xml and only looks in
|
||||
# <MediaDirectory>/<system>/<folder>/, so these folders sit beside the ROMs.
|
||||
# ES-DE resolves media at <MediaDirectory>/<system>/<folder>/<rom>.<ext>.
|
||||
GAMELIST_MEDIA_DIRS: Final[dict[str, str]] = {
|
||||
"box2d": "covers",
|
||||
"box3d": "3dboxes",
|
||||
@@ -73,7 +72,6 @@ DEFAULT_EXCLUDED_DIRS: Final = [
|
||||
"@eaDir",
|
||||
"assets",
|
||||
*GAMELIST_MEDIA_DIRS.values(),
|
||||
# RetroBat's scraper writes images/ beside the ROMs.
|
||||
"images",
|
||||
"__MACOSX",
|
||||
"#recycle",
|
||||
|
||||
@@ -562,9 +562,7 @@ async def test_export_platform_to_file_omits_tags_when_copy_fails(
|
||||
async def test_export_platform_to_file_uses_esde_media_dirs(
|
||||
platform_with_roms, isolated_filesystem
|
||||
):
|
||||
"""ES-DE resolves media by <MediaDirectory>/<system>/<folder>/<rom>.<ext> and
|
||||
ignores media paths in gamelist.xml, so 3D boxes and physical media must land
|
||||
in the folder names ES-DE expects, directly inside the platform directory."""
|
||||
"""3D boxes and physical media land in ES-DE's folder names beside the ROMs."""
|
||||
resources_base, library_base = isolated_filesystem
|
||||
platform, roms = platform_with_roms
|
||||
|
||||
@@ -633,8 +631,7 @@ async def test_exported_media_dirs_are_excluded_from_scan(
|
||||
async def test_export_platform_to_file_reuses_existing_esde_media(
|
||||
platform_with_roms, isolated_filesystem
|
||||
):
|
||||
"""Media already scraped by ES-DE into <platform>/covers/ is kept as-is instead
|
||||
of being duplicated on export."""
|
||||
"""Media already scraped by ES-DE into <platform>/covers/ is left untouched."""
|
||||
resources_base, library_base = isolated_filesystem
|
||||
platform, _ = platform_with_roms
|
||||
|
||||
|
||||
@@ -251,8 +251,7 @@ class GamelistExporter:
|
||||
if rom.gamelist_id:
|
||||
SubElement(game, "id").text = str(rom.gamelist_id)
|
||||
|
||||
# ES-DE and RetroBat name the same media differently, so both tags are
|
||||
# written; each frontend ignores the tags it does not know.
|
||||
# RetroBat reads the same media under its own tag names.
|
||||
asset_tags: list[tuple[str, str]] = [
|
||||
("box3d", "box3d"),
|
||||
("box2d_back", "boxback"),
|
||||
|
||||
Reference in new issue
Block a user