From 208e9ef7ad2ff56c3ee61f88fe9f882f6ca48a92 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sat, 13 Jan 2024 11:32:12 +0900 Subject: [PATCH] fix: strip SOH codes --- dzgui.sh | 4 ++-- helpers/funcs | 5 +++-- helpers/ui.py | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index df3ecff..8ac61dc 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.0.0.rc-17 +version=5.0.0.rc-18 #CONSTANTS aid=221100 @@ -527,7 +527,7 @@ fetch_dzq(){ fetch_helpers_by_sum(){ declare -A sums sums=( - ["ui.py"]="1c0c003c2dd9e5ed53c6bf193127d42d" + ["ui.py"]="0cecc039d2026a65094f41587aeeea53" ["query_v2.py"]="1822bd1769ce7d7cb0d686a60f9fa197" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" ["funcs"]="d9b0e6fa68314c18ac7aad565645948f" diff --git a/helpers/funcs b/helpers/funcs index 9119ddf..d0c2eaa 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -o pipefail -version=5.0.0.rc-17 +version=5.0.0.rc-18 #CONSTANTS aid=221100 @@ -528,7 +528,8 @@ sanitize(){ } parse_server_json(){ local response="$1" - <<< "$response" jq -r ' + # some servers pad SOH in name + <<< "$response" sed 's/\\u0001//g' | jq -r ' .[]|"\(.name)␞" + "\(.map|if type == "string" then ascii_downcase else "null" end)␞" + "\(if .gametype == null then "null" else (.gametype|split(",")|if any(. == "no3rd") then "1PP" else "3PP" end) end)␞" + diff --git a/helpers/ui.py b/helpers/ui.py index 9300e9e..9e50ece 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -15,7 +15,7 @@ locale.setlocale(locale.LC_ALL, '') gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GLib, Gdk, GObject, Pango -# 5.0.0-rc.17 +# 5.0.0-rc.18 app_name = "DZGUI" cache = {}