Parcourir la source

Update NCPlayer.swift

Marino Faggiana il y a 2 ans
Parent
commit
f7aa8bb623
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayer.swift

+ 4 - 0
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayer.swift

@@ -164,6 +164,10 @@ class NCPlayer: NSObject {
         if let width = width, let height = height, withSnapshot {
             player?.saveVideoSnapshot(at: fileNamePreviewLocalPath, withWidth: Int32(width), andHeight: Int32(height))
         }
+        
+        if let position = player?.position {
+            NCManageDatabase.shared.addVideo(metadata: metadata, position: position)
+        }
 
         player?.pause()
     }