Merge pull request #12 from ioncorimenia/main

Merge fixes from ioncorimenia:
Support for older export bundles from AIDCAT
Don't import null value for Author's Note
This commit is contained in:
KoboldAI Dev 2021-05-17 10:30:00 -04:00 committed by GitHub
commit 2721a5e64a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1216,6 +1216,9 @@ def importRequest():
file = open(importpath, "rb")
vars.importjs = json.load(file)
if type(vars.importjs) is dict and "stories" in vars.importjs:
vars.importjs = vars.importjs["stories"]
# Clear Popup Contents
emit('from_server', {'cmd': 'clearpopup', 'data': ''})
@ -1269,7 +1272,7 @@ def importgame():
else:
vars.prompt = ""
vars.memory = ref["memory"]
vars.authornote = ref["authorsNote"]
vars.authornote = ref["authorsNote"] if type(ref["authorsNote"]) is str else ""
vars.actions = []
vars.worldinfo = []