diff --git a/tools/subfix_webui.py b/tools/subfix_webui.py index ad4907b..d6624d0 100644 --- a/tools/subfix_webui.py +++ b/tools/subfix_webui.py @@ -110,6 +110,7 @@ def b_submit_change(*text_list): def b_delete_audio(*checkbox_list): global g_data_json, g_index, g_max_json_index + b_save_file() change = False for i, checkbox in reversed(list(enumerate(checkbox_list))): if g_index + i < len(g_data_json): @@ -121,8 +122,8 @@ def b_delete_audio(*checkbox_list): if g_index > g_max_json_index: g_index = g_max_json_index g_index = g_index if g_index >= 0 else 0 - # if change: - # b_save_file() + if change: + b_save_file() # return gr.Slider(value=g_index, maximum=(g_max_json_index if g_max_json_index>=0 else 0)), *b_change_index(g_index, g_batch) return {"value":g_index,"__type__":"update","maximum":(g_max_json_index if g_max_json_index>=0 else 0)},*b_change_index(g_index, g_batch) @@ -172,6 +173,7 @@ def b_audio_split(audio_breakpoint, *checkbox_list): def b_merge_audio(interval_r, *checkbox_list): global g_data_json , g_max_json_index + b_save_file() checked_index = [] audios_path = [] audios_text = []