[wesnoth_addon_manager] Also upload sub-sections from the .pbl.

This commit is contained in:
Elias Pschernig 2014-02-16 23:06:46 +01:00
parent d62fbe59fd
commit ae3697d4e8
2 changed files with 5 additions and 12 deletions

View file

@ -305,19 +305,16 @@ class CampaignClient:
return None
def put_campaign(self, name, cfgfile, directory, ign, stuff):
def put_campaign(self, name, cfgfile, directory, ign, pbl):
"""
Uploads a campaign to the server. The title, name, author, passphrase,
description, version and icon parameters are what would normally be
found in a .pbl file.
Uploads a campaign to the server.
The cfgfile is the name of the main .cfg file of the campaign.
The directory is the name of the campaign's directory.
"""
request = wmldata.DataSub("upload")
for k, v in stuff.items():
request.set_text_val(k, v)
request = pbl.copy()
request.name = "upload"
request.set_text_val("name", name)
data = wmldata.DataSub("data")

View file

@ -327,11 +327,7 @@ dependencies="%s"
"*.wesnoth",
"*.project"]
stuff = {}
for field in pbl.children():
stuff[field.name] = pbl.get_text_val(field.name)
mythread = cs.put_campaign_async(name, cfgfile, wmldir, ign, stuff)
mythread = cs.put_campaign_async(name, cfgfile, wmldir, ign, pbl)
pcounter = 0
while not mythread.event.isSet():