Add engine version string to ContentDB API request (#9890)
authorrubenwardy <rw@rubenwardy.com>
Sun, 24 May 2020 13:46:50 +0000 (14:46 +0100)
committerGitHub <noreply@github.com>
Sun, 24 May 2020 13:46:50 +0000 (14:46 +0100)
builtin/mainmenu/dlg_contentstore.lua

index ce5c061c62916e32b0fea5d8055f147519509dfd..3f01d4474beb4b038f8d2fe40e246c133bed30dc 100644 (file)
@@ -198,10 +198,11 @@ function store.load()
 
        assert(core.create_dir(tmpdir))
 
-       local base_url     = core.settings:get("contentdb_url")
+       local version = core.get_version()
+       local base_url = core.settings:get("contentdb_url")
        local url = base_url ..
                "/api/packages/?type=mod&type=game&type=txp&protocol_version=" ..
-               core.get_max_supp_proto()
+               core.get_max_supp_proto() .. "&engine_version=" .. version.string
 
        for _, item in pairs(core.settings:get("contentdb_flag_blacklist"):split(",")) do
                item = item:trim()