Commit f9b8fd06 authored by Alex Smith's avatar Alex Smith

listInstalledSteamGames

Добавлена проверка "StateFlags" Игры отбираются только при наличии "SharedDepots"
parent b354de77
...@@ -204,10 +204,12 @@ listInstalledSteamGames() { ...@@ -204,10 +204,12 @@ listInstalledSteamGames() {
jq -n '[]' jq -n '[]'
else else
for manifest_file in "${manifests[@]}"; do for manifest_file in "${manifests[@]}"; do
name="$(grep -Po '"name"\s+"\K[^"]+' "$manifest_file")"; name="$(grep -Po '"name"\s+"\K[^"]+' "${manifest_file}")";
if [[ ! "${name}" =~ ^(Proton |Steam Linux Runtime|Steamworks Common) ]]; then 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 \ 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}" \ --arg name "${name}" \
'{id: $id, name: $name}' '{id: $id, name: $name}'
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment