浏览代码

Update NCPlayer.swift

Marino Faggiana 2 年之前
父节点
当前提交
f7aa8bb623
共有 1 个文件被更改,包括 4 次插入0 次删除
  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()
     }