Fix for chapter repeats.
This commit is contained in:
@@ -1108,7 +1108,7 @@ def save_chapter(run_id):
|
||||
if os.path.exists(ms_path):
|
||||
ms = utils.load_json(ms_path)
|
||||
for ch in ms:
|
||||
if ch.get('num') == chap_num:
|
||||
if str(ch.get('num')) == str(chap_num):
|
||||
ch['content'] = new_content
|
||||
break
|
||||
with open(ms_path, 'w') as f: json.dump(ms, f, indent=2)
|
||||
|
||||
Reference in New Issue
Block a user