1
This commit is contained in:
parent
fa784963f4
commit
923263ad93
@ -38,6 +38,26 @@ def convertOldEvent(oldJson):
|
|||||||
properties[node[numKey]['en_name']] = properties[numKey]
|
properties[node[numKey]['en_name']] = properties[numKey]
|
||||||
del properties[numKey]
|
del properties[numKey]
|
||||||
#end for
|
#end for
|
||||||
|
if 'ext' in properties:
|
||||||
|
ext = properties['ext']
|
||||||
|
if isinstance(ext, str):
|
||||||
|
rawdata = ext.encode('utf8')
|
||||||
|
else:
|
||||||
|
ext = json.dumps(ext)
|
||||||
|
rawdata = ext.encode('utf8')
|
||||||
|
if len(rawdata) <= 1024 * 2:
|
||||||
|
properties['ext1'] = rawdata.decode('utf8')
|
||||||
|
else:
|
||||||
|
assert(len(rawdata) <= 1024 * 4)
|
||||||
|
ext1 = ext[0:2000].encode('utf8')
|
||||||
|
ext2 = ext[2000:].encode('utf8')
|
||||||
|
print(len(ext1), len(ext2), len(rawdata))
|
||||||
|
assert(len(ext1) + len(ext2) == len(rawdata))
|
||||||
|
assert(len(ext1) <= 1024 * 2 and len(ext2) <= 1024 * 2)
|
||||||
|
properties['ext1'] = ext1.decode('utf8')
|
||||||
|
properties['ext2'] = ext2.decode('utf8')
|
||||||
|
#endif
|
||||||
|
del properties['ext']
|
||||||
|
|
||||||
def convert_newjson(gameid):
|
def convert_newjson(gameid):
|
||||||
files = getFiles(OLD_PATH + gameid)
|
files = getFiles(OLD_PATH + gameid)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user