mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-02-01 10:06:44 +01:00
Update client-side story name when saving
If you save a story as a different name than it was loaded with, and then try to download it as JSON/plaintext, the downloaded file's name will now match the new story name.
This commit is contained in:
parent
12264bbdd8
commit
8df2ccae5b
@ -2050,6 +2050,11 @@ def saveRequest(savpath):
|
||||
return e
|
||||
file.close()
|
||||
|
||||
filename = path.basename(savpath)
|
||||
if(filename.endswith('.json')):
|
||||
filename = filename[:-5]
|
||||
vars.laststory = filename
|
||||
emit('from_server', {'cmd': 'setstoryname', 'data': vars.laststory}, broadcast=True)
|
||||
print("{0}Story saved to {1}!{2}".format(colors.GREEN, path.basename(savpath), colors.END))
|
||||
|
||||
#==================================================================#
|
||||
|
Loading…
x
Reference in New Issue
Block a user