From f9b8fd069ce36ce32fb3880807d417d13c9838e5 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Wed, 12 Feb 2025 01:43:11 +0500 Subject: [PATCH] listInstalledSteamGames MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Добавлена проверка "StateFlags" Игры отбираются только при наличии "SharedDepots" --- data_from_portwine/scripts/add_in_steam.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/data_from_portwine/scripts/add_in_steam.sh b/data_from_portwine/scripts/add_in_steam.sh index 69f6bb8..7e3cd21 100755 --- a/data_from_portwine/scripts/add_in_steam.sh +++ b/data_from_portwine/scripts/add_in_steam.sh @@ -204,10 +204,12 @@ listInstalledSteamGames() { jq -n '[]' else for manifest_file in "${manifests[@]}"; do - name="$(grep -Po '"name"\s+"\K[^"]+' "$manifest_file")"; - if [[ ! "${name}" =~ ^(Proton |Steam Linux Runtime|Steamworks Common) ]]; then + name="$(grep -Po '"name"\s+"\K[^"]+' "${manifest_file}")"; + stateflags="$(grep -Po '"StateFlags"\s+"\K\d+' "${manifest_file}")" +# if [[ ! "${name}" =~ ^(Proton |Steam Linux Runtime|Steamworks Common) ]]; then + if ((stateflags & 4)) && grep -q '"SharedDepots"' "${manifest_file}"; then jq -n \ - --arg id "$(grep -Po '"appid"\s+"\K\d+' "$manifest_file")" \ + --arg id "$(grep -Po '"appid"\s+"\K\d+' "${manifest_file}")" \ --arg name "${name}" \ '{id: $id, name: $name}' fi