mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Add setting to hide mature content from ContentDB
This commit is contained in:
parent
9a071d66a5
commit
626b0b7e6a
3 changed files with 22 additions and 6 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue