@@ -550,7 +550,7 @@ def get_frame_holder(self):
550550 disk_path = output_path .parent / (output_path .stem + ".dipui" )
551551
552552 self ._file_obj = SafeFileIO (
553- disk_path , "w+b" , save_config = SaveConditions (number_seconds = 60 * 3 )
553+ disk_path , "w+b" , save_config = SaveConditions (number_seconds = self . settings . backup_every )
554554 )
555555
556556 with video_path .open ("rb" ) as f :
@@ -597,7 +597,7 @@ def _open(self):
597597 self .settings .storage_mode = "disk"
598598
599599 self ._file_obj = SafeFileIO (
600- self ._restore_path , "r+b" , SaveConditions (number_seconds = 60 * 3 )
600+ self ._restore_path , "r+b" , SaveConditions (number_seconds = self . settings . backup_every )
601601 )
602602
603603 ctx = PoolWithProgress .get_optimal_ctx ()
@@ -1822,8 +1822,13 @@ def get_settings(cls) -> ConfigSpec:
18221822 "dipui_file" : (
18231823 None ,
18241824 type_casters .Union (type_casters .Literal (None ), str ),
1825- "A path specifying where to save the dipui file" ,
1825+ "A path specifying where to save the dipui file. " ,
18261826 ),
1827+ "backup_every" : (
1828+ 360 ,
1829+ type_casters .RangedInteger (60 , np .inf ),
1830+ "Save the dipui file to disk after this number of seconds."
1831+ )
18271832 }
18281833
18291834 @classmethod
0 commit comments