From a02abc42f35256e480e30aa0c4d8e1de451f2aa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Tue, 5 Oct 2021 21:10:44 +0200 Subject: [PATCH] Download all adlists that are enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- gravity.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gravity.sh b/gravity.sh index dfaf4fea..50b6cd8e 100755 --- a/gravity.sh +++ b/gravity.sh @@ -379,8 +379,8 @@ gravity_DownloadBlocklists() { # Retrieve source URLs from gravity database # We source only enabled adlists, sqlite3 stores boolean values as 0 (false) or 1 (true) - mapfile -t sources <<< "$(sqlite3 "${gravityDBfile}" "SELECT address FROM vw_adlist;" 2> /dev/null)" - mapfile -t sourceIDs <<< "$(sqlite3 "${gravityDBfile}" "SELECT id FROM vw_adlist;" 2> /dev/null)" + mapfile -t sources <<< "$(sqlite3 "${gravityDBfile}" "SELECT address FROM adlist WHERE enabled = 1;" 2> /dev/null)" + mapfile -t sourceIDs <<< "$(sqlite3 "${gravityDBfile}" "SELECT id FROM adlist WHERE enabled =1;" 2> /dev/null)" # Parse source domains from $sources mapfile -t sourceDomains <<< "$(