Skip to content

Commit 7a011ed

Browse files
committed
fix: attempt to prevent modifications to media creation date for videos while exporting
Signed-off-by: Tommy van der Vorst <tommy@pixelspark.nl>
1 parent e252e7a commit 7a011ed

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Sushitrain/PhotoBackup.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,16 +620,15 @@ enum PhotoSyncProgress {
620620
_ = await withCheckedContinuation { resolve in
621621
Log.info("Exporting video \(asset.originalFilename)")
622622
let options = PHVideoRequestOptions()
623+
options.version = .current
623624
options.deliveryMode = .highQualityFormat
624625

625626
PHImageManager.default().requestExportSession(
626627
forVideo: asset, options: options, exportPreset: AVAssetExportPresetPassthrough
627628
) { exportSession, info in
628629
if let es = exportSession {
629630
es.outputURL = fileURL
630-
es.outputFileType = .mov
631-
es.shouldOptimizeForNetworkUse = false
632-
631+
633632
es.exportAsynchronously {
634633
Log.info("Done exporting video \(asset.originalFilename)")
635634
resolve.resume(returning: true)

0 commit comments

Comments
 (0)