From 5a75f45aeb1d7e6f4e895b9f7d5fc07ab2f858ca Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Feb 2026 03:53:27 +0000 Subject: [PATCH] Add cheat file category support for new RomM API The RomM API now includes 'cheat' in the RomFileCategory enum. Add it to the known_subfolders fallback list and subfolder icon map so cheat files are properly categorized and displayed. https://claude.ai/code/session_018F8ZDPDRPZDgmvtGxeBJVs --- cogs/search.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cogs/search.py b/cogs/search.py index 77ab056..dc0282e 100644 --- a/cogs/search.py +++ b/cogs/search.py @@ -113,7 +113,7 @@ def get_file_subfolder(file_info: Dict) -> Optional[str]: if not file_path: return None - known_subfolders = ['hack', 'dlc', 'manual', 'mod', 'patch', 'update', 'demo', 'translation', 'prototype'] + known_subfolders = ['hack', 'dlc', 'manual', 'mod', 'patch', 'update', 'demo', 'translation', 'prototype', 'cheat'] path_parts = file_path.split('/') for part in path_parts: # include all parts if part.lower() in known_subfolders: @@ -133,6 +133,7 @@ def get_subfolder_icon(subfolder: Optional[str]) -> str: 'demo': '🎮', 'translation': '🌐', 'prototype': '🔬', + 'cheat': '🃏', None: '📄' # Default for main/root files } return icons.get(subfolder, '📁')