mirror of
https://github.com/aclist/dztui.git
synced 2024-12-28 05:12:36 +01:00
Add debug code
This commit is contained in:
parent
aa641d596f
commit
d80126ffef
2 changed files with 30 additions and 2 deletions
|
@ -5,6 +5,14 @@
|
|||
- Custom query API
|
||||
- Standardize dialogs
|
||||
|
||||
## [2.7.0-rc.11] 2022-09-24
|
||||
### Added
|
||||
- Add debug code to troubleshoot API responses
|
||||
|
||||
## [2.7.0-rc.10] 2022-09-23
|
||||
### Fixed
|
||||
- Server list not appearing when launching script through Steam
|
||||
|
||||
## [2.7.0-rc.9] 2022-09-22
|
||||
### Added
|
||||
- Add alternative IP query method
|
||||
|
|
24
dzgui.sh
24
dzgui.sh
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -o pipefail
|
||||
version=2.7.0-rc.10
|
||||
version=2.7.0-rc.11
|
||||
|
||||
aid=221100
|
||||
game="dayz"
|
||||
|
@ -1004,6 +1004,21 @@ server_browser(){
|
|||
}
|
||||
fetch > >(zenity --pulsate --progress --auto-close --width=500 2>/dev/null)
|
||||
response=$(< $file jq -r '.response.servers')
|
||||
#DEBUG
|
||||
debug_log="$HOME/.local/share/dzgui/DEBUG.log"
|
||||
echo "======START DEBUG======" >> $debug_log
|
||||
echo "======Test key length======" >> $debug_log
|
||||
echo -n "$steam_api" | wc -m >> $debug_log
|
||||
echo "======Short query======" >> $debug_log
|
||||
debug_res=$(curl -Ls "https://api.steampowered.com/IGameServersService/GetServerList/v1/?filter=\appid\221100&limit=10&key=$steam_api")
|
||||
debug_len=$(echo "$debug_res" | jq '[.response.servers[]]|length')
|
||||
echo "Expected 10 servers, found $debug_len servers" >> $debug_log
|
||||
echo "Response follows---->" >> $debug_log
|
||||
echo "$debug_res" | jq >> $debug_log
|
||||
#echo "======Long query======" >> $debug_log
|
||||
#debug_res=$(curl -Ls "https://api.steampowered.com/IGameServersService/GetServerList/v1/?filter=\appid\221100&limit=20000&key=$steam_api")
|
||||
#echo "$debug_res" | jq >> $HOME/.local/share/dzgui/DEBUG.log
|
||||
echo "======END DEBUG======" >> $debug_log
|
||||
local sel=$(munge_servers)
|
||||
if [[ -z $sel ]]; then
|
||||
unset filters
|
||||
|
@ -1343,7 +1358,8 @@ lock(){
|
|||
echo $$ > $config_path/.lockfile
|
||||
fi
|
||||
}
|
||||
main(){
|
||||
initial_setup(){
|
||||
echo "# Initial setup"
|
||||
lock
|
||||
run_depcheck
|
||||
check_architecture
|
||||
|
@ -1353,6 +1369,10 @@ main(){
|
|||
run_varcheck
|
||||
init_items
|
||||
setup
|
||||
echo "100"
|
||||
}
|
||||
main(){
|
||||
initial_setup > >(zenity --pulsate --progress --auto-close --title=DZGUI --width=500)
|
||||
main_menu
|
||||
#cruddy handling for steam forking
|
||||
[[ $? -eq 1 ]] && pkill -f dzgui.sh
|
||||
|
|
Loading…
Reference in a new issue