mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-21 21:42:24 +01:00
Fix statistics reporting the 5.10 client as web (not just the import script)
This commit is contained in:
parent
73376194e0
commit
699eabef80
@ -127,7 +127,8 @@ def download_release(package, id):
|
||||
|
||||
ip = request.headers.get("X-Forwarded-For") or request.remote_addr
|
||||
if ip is not None and not is_user_bot():
|
||||
is_minetest = (request.headers.get("User-Agent") or "").startswith("Minetest")
|
||||
user_agent = request.headers.get("User-Agent") or ""
|
||||
is_minetest = user_agent.startswith("Luanti") or user_agent.startswith("Minetest")
|
||||
reason = request.args.get("reason")
|
||||
PackageDailyStats.update(package, is_minetest, reason)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user