mirror of
https://github.com/aclist/dztui.git
synced 2025-04-05 03:53:01 +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
|
||||
- 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
|
||||
### Added
|
||||
- Validate Steam API key
|
||||
|
|
11
dzgui.sh
11
dzgui.sh
|
@ -400,9 +400,10 @@ connect(){
|
|||
return
|
||||
fi
|
||||
ip=$(echo "$1" | awk -F"$separator" '{print $1}')
|
||||
#TODO: deprecated (for now)
|
||||
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
|
||||
rc=$?
|
||||
[[ $rc -eq 1 ]] && return
|
||||
|
@ -413,7 +414,11 @@ connect(){
|
|||
passed_mod_check
|
||||
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(){
|
||||
sa_ip=$(echo "$1" | awk -F: '{print $1}')
|
||||
for i in ${qport_arr[@]}; do
|
||||
|
|
Loading…
Reference in a new issue