mirror of
https://github.com/rommapp/romm.git
synced 2026-06-27 22:35:57 +00:00
Add local_path parameter for /gamelist/export API
This commit is contained in:
@@ -23,6 +23,7 @@ async def export_gamelist(
|
||||
platform_ids: Annotated[
|
||||
List[int], Query(description="List of platform IDs to export")
|
||||
],
|
||||
local_path: Annotated[bool, Query(description="Use local paths instead of URLs")] = False,
|
||||
) -> Response:
|
||||
"""Export platforms/ROMs to gamelist.xml format and write to platform directories"""
|
||||
if not platform_ids:
|
||||
@@ -37,7 +38,7 @@ async def export_gamelist(
|
||||
|
||||
# Export each platform to its respective directory
|
||||
for platform_id in platform_ids:
|
||||
success = await exporter.export_platform_to_file(platform_id, request)
|
||||
success = await exporter.export_platform_to_file(platform_id, request if not local_path else None)
|
||||
if success:
|
||||
files_written.append(f"gamelist_{platform_id}.xml")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user