Skip to content

Add Pegasus Frontend metadata export support#3153

Open
gantoine wants to merge 9 commits intomasterfrom
pegasus-metadata-export
Open

Add Pegasus Frontend metadata export support#3153
gantoine wants to merge 9 commits intomasterfrom
pegasus-metadata-export

Conversation

@gantoine
Copy link
Copy Markdown
Member

@gantoine gantoine commented Mar 21, 2026

Description
Explain the changes or enhancements you are proposing with this pull request.

Add metadata.pegasus.txt export alongside the existing gamelist.xml export. Restructure the export system: rename the gamelist endpoint to a general-purpose export endpoint (/api/export/) with sub-routes for each format (/gamelist-xml, /pegasus). Move config from flat scan.export_gamelist to nested scan.export.gamelist_xml and scan.export.pegasus for auto-export on scan.

Fixes #675

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

Add metadata.pegasus.txt export alongside the existing gamelist.xml
export. Restructure the export system: rename the gamelist endpoint to
a general-purpose export endpoint (`/api/export/`) with sub-routes for
each format (`/gamelist-xml`, `/pegasus`). Move config from flat
`scan.export_gamelist` to nested `scan.export.gamelist_xml` and
`scan.export.pegasus` for auto-export on scan.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 21, 2026

Test Results (postgresql)

1 025 tests   1 024 ✅  2m 50s ⏱️
    1 suites      1 💤
    1 files        0 ❌

Results for commit 6c88333.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 21, 2026

Test Results (mariadb)

1 025 tests   1 024 ✅  2m 38s ⏱️
    1 suites      1 💤
    1 files        0 ❌

Results for commit 6c88333.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 21, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
14460 9816 68% 0% 🟢

New Files

File Coverage Status
backend/utils/pegasus_exporter.py 69% 🟢
TOTAL 69% 🟢

Modified Files

File Coverage Status
backend/config/config_manager.py 55% 🟢
backend/endpoints/sockets/scan.py 24% 🟢
backend/handler/filesystem/base_handler.py 89% 🟢
backend/main.py 95% 🟢
backend/utils/gamelist_exporter.py 63% 🟢
TOTAL 65% 🟢

updated for commit: 6c88333 by action🐍

@gantoine gantoine changed the title feat: add Pegasus Frontend metadata export support Add Pegasus Frontend metadata export support Mar 21, 2026
@gantoine gantoine marked this pull request as ready for review March 22, 2026 02:33
Copilot AI review requested due to automatic review settings March 22, 2026 02:33
Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Pegasus Frontend metadata export support and generalizes the existing gamelist export into a multi-format export system.

Changes:

  • Introduces metadata.pegasus.txt export generation (Pegasus Frontend format) alongside the existing gamelist.xml export.
  • Renames/reshapes the backend API from a dedicated gamelist export route to a general /api/export/* endpoint with per-format subroutes.
  • Updates scan auto-export configuration from scan.export_gamelist to scan.export.{gamelist_xml,pegasus} and wires auto-export into the scan completion flow.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
frontend/src/services/api/gamelist.ts Removes the old dedicated gamelist export client.
frontend/src/services/api/export.ts Adds new client methods for /export/gamelist-xml and /export/pegasus.
examples/config.example.yml Documents new scan.export.* auto-export configuration keys.
backend/utils/pegasus_exporter.py Implements Pegasus metadata.pegasus.txt generation and file writing per platform.
backend/main.py Registers the new export router under /api.
backend/endpoints/sockets/scan.py Runs optional auto-export for gamelist XML and Pegasus metadata after scans.
backend/endpoints/export.py Converts export routing to /export/* and adds Pegasus export endpoint.
backend/config/config_manager.py Adds new config flags and persists them under scan.export.*; excludes metadata.pegasus.txt from scans.
Comments suppressed due to low confidence (1)

backend/endpoints/export.py:105

  • files_written is populated with names like metadata_pegasus_{platform_id}.txt, but the exporter writes a fixed metadata.pegasus.txt into each platform directory. This makes the logs misleading; consider logging the actual filename (and optionally the platform directory) instead of a synthetic name.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gantoine gantoine requested a review from Copilot March 22, 2026 02:46
Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (1)

backend/endpoints/export.py:105

  • The endpoint logs/appends metadata_pegasus_{platform_id}.txt, but the exporter writes metadata.pegasus.txt into each platform directory. This is misleading for users and makes troubleshooting harder; update the recorded filename/log output to match the actual output file name/path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gantoine gantoine requested a review from Copilot March 22, 2026 13:26
@gantoine gantoine added the on-hold Pending further research or blocked by another issue label Mar 22, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (2)

backend/endpoints/export.py:50

  • The endpoint records/logs filenames like gamelist_{platform_id}.xml, but the exporter writes a fixed gamelist.xml into each platform directory. This makes logs misleading and makes it hard to verify what was actually written; consider logging the real output path (platform dir + filename) or just platform IDs.
    backend/endpoints/export.py:105
  • Same issue as the gamelist export: the endpoint logs metadata_pegasus_{platform_id}.txt, but the exporter writes metadata.pegasus.txt into each platform directory. Update the tracked/logged filename to match the actual output (or include the platform directory) to avoid confusion during troubleshooting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on-hold Pending further research or blocked by another issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Pegasus Frontend Metadata Export Support

2 participants