From 75fadb9b55fbb1454bbddd60d0ed99924200d2d4 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 13 Feb 2024 08:55:26 +0100 Subject: [PATCH] Adlists need to be grouped by both address and type to differentiate between anti-/gravity lists Signed-off-by: DL6ER --- advanced/Scripts/query.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/query.sh b/advanced/Scripts/query.sh index 581d2069..df7db893 100755 --- a/advanced/Scripts/query.sh +++ b/advanced/Scripts/query.sh @@ -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)