marinofaggiana 4 жил өмнө
parent
commit
a5f749ff63

+ 2 - 3
iOSClient/Viewer/NCViewerImageAudioVideo/NCVideoViewController.swift

@@ -79,9 +79,8 @@ class NCVideoViewController: AVPlayerViewController {
             // Save cache
             if !CCUtility.fileProviderStorageExists(self.metadata.ocId, fileNameView:self.metadata.fileNameView) {
                 
-                guard let url = KTVHTTPCache.cacheCompleteFileURL(with: self.videoURL) else {
-                    return
-                }
+                guard let videoURL = self.videoURL else { return }
+                guard let url = KTVHTTPCache.cacheCompleteFileURL(with: videoURL) else { return }
                 
                 CCUtility.copyFile(atPath: url.path, toPath: CCUtility.getDirectoryProviderStorageOcId(self.metadata.ocId, fileNameView: self.metadata.fileNameView))
                 NCManageDatabase.sharedInstance.addLocalFile(metadata: self.metadata)