mirror of
https://github.com/aclist/dztui.git
synced 2025-04-05 20:13:00 +02:00
Restore legacy API method
This commit is contained in:
parent
0a5030c60e
commit
0e22e563f6
2 changed files with 12 additions and 3 deletions
|
@ -6,6 +6,10 @@
|
||||||
- Standardize dialogs
|
- Standardize dialogs
|
||||||
- Query and connect by IP/port
|
- Query and connect by IP/port
|
||||||
|
|
||||||
|
## [2.6.0-rc.3] 2022-09-03
|
||||||
|
### Changed
|
||||||
|
- Revert to legacy API method
|
||||||
|
|
||||||
## [2.6.0-rc.2] 2022-08-31
|
## [2.6.0-rc.2] 2022-08-31
|
||||||
### Added
|
### Added
|
||||||
- Validate Steam API key
|
- Validate Steam API key
|
||||||
|
|
11
dzgui.sh
11
dzgui.sh
|
@ -400,9 +400,10 @@ connect(){
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
ip=$(echo "$1" | awk -F"$separator" '{print $1}')
|
ip=$(echo "$1" | awk -F"$separator" '{print $1}')
|
||||||
#TODO: deprecated (for now)
|
|
||||||
bid=$(echo "$1" | awk -F"$separator" '{print $2}')
|
bid=$(echo "$1" | awk -F"$separator" '{print $2}')
|
||||||
fetch_mods_sa "$ip"
|
#TODO: deprecated (for now)
|
||||||
|
#fetch_mods_sa "$ip"
|
||||||
|
fetch_mods "$bid"
|
||||||
validate_mods
|
validate_mods
|
||||||
rc=$?
|
rc=$?
|
||||||
[[ $rc -eq 1 ]] && return
|
[[ $rc -eq 1 ]] && return
|
||||||
|
@ -413,7 +414,11 @@ connect(){
|
||||||
passed_mod_check
|
passed_mod_check
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
fetch_mods(){
|
||||||
|
remote_mods=$(curl -s "$api" -H "Authorization: Bearer "$api_key"" -G -d filter[ids][whitelist]="$1" -d "sort=-players" \
|
||||||
|
| jq -r '.data[] .attributes .details .modIds[]')
|
||||||
|
}
|
||||||
|
#TODO: deprecated (for now)
|
||||||
fetch_mods_sa(){
|
fetch_mods_sa(){
|
||||||
sa_ip=$(echo "$1" | awk -F: '{print $1}')
|
sa_ip=$(echo "$1" | awk -F: '{print $1}')
|
||||||
for i in ${qport_arr[@]}; do
|
for i in ${qport_arr[@]}; do
|
||||||
|
|
Loading…
Reference in a new issue