1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 06:11:47 +02:00

Updated SQLextract.py with metadata handling

This commit is contained in:
LeMagnesium
2015-07-09 20:10:19 +02:00
parent 40e93d4922
commit 4acb440b3f
3 changed files with 154 additions and 133 deletions

View File

@ -27,8 +27,8 @@ for skin in skins_exclued:
sys.stderr.write("%s\n" % err)
continue
# for texture, preview and meta files
for f_skin in ( os.path.join(p_textures,"%s.png" % skin),
os.path.join(p_textures,"%s_preview.png" % skin),
for f_skin in ( os.path.join(p_textures,"%s.png" % skin),
os.path.join(p_textures,"%s_preview.png" % skin),
os.path.join(p_meta, "%s.txt" % skin) ):
if os.path.exists(f_skin):
try:

View File

@ -23,7 +23,7 @@ def addpage(page):
print("Error", r.status)
exit(r.status)
return
data = r.read().decode()
l = json.loads(data)
if not l["success"]:
@ -48,7 +48,7 @@ def addpage(page):
if r.status != 200:
print("Error", r.status)
continue
data = r.read()
f = open(skinsdir + "character_" + str(i) + "_preview.png", "wb")
f.write(data)