v0.2.4: stop export loop on Ctrl+C instead of flooding failures
- Add IsCancelled() to Bridge interface - Check bridge.IsCancelled() before each export in serial/parallel/backupTree - Parallel workers mark remaining slots as 'cancelled' instead of exporting - Add photos_request_is_cancelled to ObjC and C stub
This commit is contained in:
@@ -78,6 +78,10 @@ func (*CgoBridge) Cancel() {
|
||||
C.photos_request_cancel()
|
||||
}
|
||||
|
||||
func (*CgoBridge) IsCancelled() bool {
|
||||
return C.photos_request_is_cancelled() != 0
|
||||
}
|
||||
|
||||
func (*CgoBridge) ExportPreview(assetID, outputDir string, targetSize, index int) (ExportResult, error) {
|
||||
cid := C.CString(assetID)
|
||||
defer C.free(unsafe.Pointer(cid))
|
||||
|
||||
Reference in New Issue
Block a user