marinofaggiana 3 years ago
parent
commit
5c1ea04841
1 changed files with 3 additions and 1 deletions
  1. 3 1
      iOSClient/Viewer/NCViewerImage/NCViewerImage.swift

+ 3 - 1
iOSClient/Viewer/NCViewerImage/NCViewerImage.swift

@@ -370,7 +370,9 @@ class NCViewerImage: UIViewController {
                 NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: player?.currentItem, queue: .main) { (notification) in
                     if let item = notification.object as? AVPlayerItem, let currentItem = self.player?.currentItem, item == currentItem {
                         self.player?.seek(to: .zero)
-                        NCManageDatabase.shared.deleteVideoTime(metadata: self.currentMetadata)
+                        if !self.currentMetadata.livePhoto {
+                            NCManageDatabase.shared.deleteVideoTime(metadata: self.currentMetadata)
+                        }
                     }
                 }