summaryrefslogtreecommitdiff
path: root/builtin/mainmenu/dlg_contentstore.lua
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2019-02-03 17:54:56 +0000
committerGitHub <noreply@github.com>2019-02-03 17:54:56 +0000
commit626b0b7e6a61d329e2b94a0f1ca15db6625b5e5d (patch)
tree2911a4f2c6fe048f7b2c7b393268c8695442f0c0 /builtin/mainmenu/dlg_contentstore.lua
parent9a071d66a59bd0db72d09a3ca75b2ab9247dda92 (diff)
downloadminetest-626b0b7e6a61d329e2b94a0f1ca15db6625b5e5d.tar.gz
minetest-626b0b7e6a61d329e2b94a0f1ca15db6625b5e5d.tar.bz2
minetest-626b0b7e6a61d329e2b94a0f1ca15db6625b5e5d.zip
Add setting to hide mature content from ContentDB
Diffstat (limited to 'builtin/mainmenu/dlg_contentstore.lua')
-rw-r--r--builtin/mainmenu/dlg_contentstore.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/builtin/mainmenu/dlg_contentstore.lua b/builtin/mainmenu/dlg_contentstore.lua
index ab55e3848..655e596d4 100644
--- a/builtin/mainmenu/dlg_contentstore.lua
+++ b/builtin/mainmenu/dlg_contentstore.lua
@@ -285,9 +285,14 @@ function store.load()
local show_nonfree = core.settings:get_bool("show_nonfree_packages")
local url = base_url ..
"/api/packages/?type=mod&type=game&type=txp&protocol_version=" ..
- core.get_max_supp_proto() ..
- "&nonfree=" ..
- (show_nonfree and "true" or "false")
+ core.get_max_supp_proto()
+
+ for _, item in pairs(core.settings:get("contentdb_flag_blacklist"):split(",")) do
+ item = item:trim()
+ if item ~= "" then
+ url = url .. "&hide=" .. item
+ end
+ end
core.download_file(url, target)