mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 06:46:00 +00:00
feat: add platform game counts and enhance platform selection in Setup.vue
This commit is contained in:
@@ -86,9 +86,21 @@ class FSPlatformsHandler(FSHandler):
|
||||
Returns:
|
||||
List of platform slugs.
|
||||
"""
|
||||
cnfg = cm.get_config()
|
||||
|
||||
try:
|
||||
platforms = await self.list_directories(path=self.get_platforms_directory())
|
||||
except FileNotFoundError as e:
|
||||
raise FolderStructureNotMatchException() from e
|
||||
|
||||
# For Structure B, only include directories that have a roms subfolder
|
||||
if not os.path.exists(cnfg.HIGH_PRIO_STRUCTURE_PATH):
|
||||
platforms = [
|
||||
platform
|
||||
for platform in platforms
|
||||
if os.path.exists(
|
||||
os.path.join(LIBRARY_BASE_PATH, platform, cnfg.ROMS_FOLDER_NAME)
|
||||
)
|
||||
]
|
||||
|
||||
return self._exclude_platforms(platforms)
|
||||
|
||||
Reference in New Issue
Block a user