mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Adlists need to be grouped by both address and type to differentiate between anti-/gravity lists
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
1a59b407e0
commit
75fadb9b55
@ -48,7 +48,7 @@ GenerateOutput() {
|
||||
lists_data=$(printf %s "${data}" | jq '.search.domains | [.[] | {domain: .domain, type: .type}]')
|
||||
|
||||
# construct a new json for the gravity results where each object contains the adlist URL and the related domains
|
||||
gravity_data=$(printf %s "${data}" | jq '.search.gravity | group_by(.address) | map({ address: (.[0].address), domains: [.[] | .domain] })')
|
||||
gravity_data=$(printf %s "${data}" | jq '.search.gravity | group_by(.address,.type) | map({ address: (.[0].address), domains: [.[] | .domain] })')
|
||||
|
||||
# number of objects in each json
|
||||
num_gravity=$(printf %s "${gravity_data}" | jq length)
|
||||
|
Loading…
Reference in New Issue
Block a user