From b9dbec6c4040f96eaf40bdf6b2c09b60689acd4f Mon Sep 17 00:00:00 2001 From: Gemba Date: Wed, 2 Sep 2026 13:15:19 +0200 Subject: [PATCH] skyscraper: update the system/platform detection Do also rely on configured systems in EmulationStation config in addition to the platform discovery in `~/RetroPie/roms/` to have a strict set of available platforms. --- scriptmodules/supplementary/skyscraper.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scriptmodules/supplementary/skyscraper.sh b/scriptmodules/supplementary/skyscraper.sh index 9b0f1be94f..fb08dce517 100644 --- a/scriptmodules/supplementary/skyscraper.sh +++ b/scriptmodules/supplementary/skyscraper.sh @@ -192,9 +192,18 @@ function _check_ver_skyscraper() { return 0 } -# List any non-empty systems found in the ROM folder +# Create intersection of systems configured according to ES frontend +# and non-empty ROM-folders (~/RetroPie/roms//) function _list_systems_skyscraper() { - find -L "$romdir/" -mindepth 1 -maxdepth 1 -type d -not -empty | sort -u + local es_cfg="emulationstation/es_systems.cfg" + if [[ -f "$home/.$es_cfg" ]]; then + es_cfg="$home/.$es_cfg" + else + es_cfg="/etc/$es_cfg" + fi + mapfile set_es < <(xmlstarlet select --template --value-of "/systemList/system/name/text()" "$es_cfg" | sed -e /retropie/d | sort -u) + mapfile set_fs < <(find -L "$romdir/" -mindepth 1 -maxdepth 1 -type d -not -empty -printf "%f\n" | sort) + comm -1 -2 <(printf '%s' "${set_es[@]}") <(printf '%s' "${set_fs[@]}") } function configure_skyscraper() {