mirror of
https://github.com/aclist/dztui.git
synced 2026-10-31 15:12:48 +01:00
Empty delete server array when returning
This commit is contained in:
1 parent
48545ce384
commit
6e0eeef733
2 files changed
+9
-5
No files matched your search
+4
-1
@@ -5,7 +5,10 @@
|
|||||||
- Custom query API
|
- Custom query API
|
||||||
- Standardize dialogs
|
- Standardize dialogs
|
||||||
|
|
||||||
## [2.7.0-rc.24] 2022-10-03
|
## [2.7.0-rc.26] 2022-10-04
|
||||||
|
### Fixed
|
||||||
|
- Delete server list array not being emptied when going back to main menu
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Progress bars when downloading updates
|
- Progress bars when downloading updates
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
version=2.7.0-rc.25
|
version=2.7.0-rc.26
|
||||||
|
|
||||||
aid=221100
|
aid=221100
|
||||||
game="dayz"
|
game="dayz"
|
||||||
@@ -527,7 +527,7 @@ fetch_ip_metadata(){
|
|||||||
test_steam_api(){
|
test_steam_api(){
|
||||||
local code=$(curl -ILs "https://api.steampowered.com/IGameServersService/GetServerList/v1/?filter=\appid\221100&limit=10&key=$steam_api" \
|
local code=$(curl -ILs "https://api.steampowered.com/IGameServersService/GetServerList/v1/?filter=\appid\221100&limit=10&key=$steam_api" \
|
||||||
| grep -E "^HTTP")
|
| grep -E "^HTTP")
|
||||||
[[ $code =~ 403 ]] && { echo 403 >> logs; return 1; }
|
[[ $code =~ 403 ]] && return 1
|
||||||
}
|
}
|
||||||
add_steam_api(){
|
add_steam_api(){
|
||||||
[[ ! $(test_steam_api) ]] && return 1
|
[[ ! $(test_steam_api) ]] && return 1
|
||||||
@@ -1161,12 +1161,12 @@ page_through(){
|
|||||||
parse_json(){
|
parse_json(){
|
||||||
page=$(echo "$list_response" | jq -r '.links.next?')
|
page=$(echo "$list_response" | jq -r '.links.next?')
|
||||||
if [[ $first_entry -eq 1 ]]; then
|
if [[ $first_entry -eq 1 ]]; then
|
||||||
list=$(echo "$list_response" | jq -r '.data[] .attributes | "\(.name)\t\(.ip):\(.port)\t\(.players)/\(.maxPlayers)\t\(.details.time)\t\(.status)\t\(.id)"')
|
local list=$(echo "$list_response" | jq -r '.data[] .attributes | "\(.name)\t\(.ip):\(.port)\t\(.players)/\(.maxPlayers)\t\(.details.time)\t\(.status)\t\(.id)"')
|
||||||
idarr+=("$list")
|
idarr+=("$list")
|
||||||
first_entry=0
|
first_entry=0
|
||||||
fi
|
fi
|
||||||
if [[ "$page" != "null" ]]; then
|
if [[ "$page" != "null" ]]; then
|
||||||
list=$(echo "$list_response" | jq -r '.data[] .attributes | "\(.name)\t\(.ip):\(.port)\t\(.players)/\(.maxPlayers)\t\(.details.time)\t\(.status)\t\(.id)"')
|
local list=$(echo "$list_response" | jq -r '.data[] .attributes | "\(.name)\t\(.ip):\(.port)\t\(.players)/\(.maxPlayers)\t\(.details.time)\t\(.status)\t\(.id)"')
|
||||||
idarr+=("$list")
|
idarr+=("$list")
|
||||||
page_through
|
page_through
|
||||||
else
|
else
|
||||||
@@ -1185,6 +1185,7 @@ check_ping(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
create_array(){
|
create_array(){
|
||||||
|
rows=()
|
||||||
list=$(cat $tmp)
|
list=$(cat $tmp)
|
||||||
#TODO: improve error handling for null values
|
#TODO: improve error handling for null values
|
||||||
lc=1
|
lc=1
|
||||||
|
|||||||
Reference in new issue
Block a user