Conversation
Greptile SummaryThis PR fixes a bug in the LaunchBox metadata handler where the dash-to-colon substitution (converting
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["get_rom(fs_name, platform_slug, keep_tags)"] --> B{Local match found?}
B -- Yes --> C[Return local + remote merged ROM]
B -- No --> D{LaunchBox ID tag in filename?}
D -- Yes --> E[get_rom_by_id]
E --> F{ID found?}
F -- Yes --> G[Return ROM by ID]
F -- No --> H{remote_available?}
D -- No --> H
H -- No --> I[Return fallback_rom]
H -- Yes --> J{keep_tags?}
J -- "False" --> K["search_term = get_file_name_with_no_tags(fs_name)"]
J -- "True" --> L["search_term = fs_name"]
K --> M["re.sub(DASH_COLON_REGEX, ': ', search_term).lower() ← applied in BOTH branches now"]
L --> M
M --> N{platform_slug == SCUMMVM?}
N -- Yes --> O["_scummvm_format(search_term)"]
N -- No --> P["_remote.get_rom(search_term, ...)"]
O --> P
P --> Q{index_entry found?}
Q -- No --> R[Return fallback_rom]
Q -- Yes --> S[Return remote ROM]
Last reviewed commit: 207f8a3 |
There was a problem hiding this comment.
Pull request overview
Improves LaunchBox metadata matching by normalizing ROM search terms so Windows-friendly - separators match LaunchBox’s : naming convention, including in manual name searches (keep_tags mode).
Changes:
- Apply
DASH_COLON_REGEXdash→colon normalization regardless ofkeep_tags, and lowercase in one step. - Make
keep_tags=Trueusage explicit inget_matched_roms_by_name. - Simplify
get_matched_rom_by_idto rely onget_rom_by_id’s defaultremote_enabled=True.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Description
Explain the changes or enhancements you are proposing with this pull request.
Fixes #3067
Checklist
Please check all that apply.