mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Fix for action count on new version of save file
This commit is contained in:
@@ -96,6 +96,13 @@ def getstoryfiles():
|
|||||||
f.close()
|
f.close()
|
||||||
continue
|
continue
|
||||||
f.close()
|
f.close()
|
||||||
|
if 'file_version' in js:
|
||||||
|
try:
|
||||||
|
ob["actions"] = int(js["actions"]["action_count"])+1
|
||||||
|
except TypeError:
|
||||||
|
print(f"Browser loading error: {file} has incorrect format.")
|
||||||
|
continue
|
||||||
|
else:
|
||||||
try:
|
try:
|
||||||
ob["actions"] = len(js["actions"])
|
ob["actions"] = len(js["actions"])
|
||||||
except TypeError:
|
except TypeError:
|
||||||
|
Reference in New Issue
Block a user