|
@@ -96,6 +96,7 @@ class NCViewerMediaPage: UIViewController {
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(downloadedFile(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterDownloadedFile), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(triggerProgressTask(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterProgressTask), object: nil)
|
|
|
|
|
|
+ NotificationCenter.default.addObserver(self, selector: #selector(uploadStartFile(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterUploadStartFile), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(uploadedFile(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterUploadedFile), object: nil)
|
|
|
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(hidePlayerToolBar(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterHidePlayerToolBar), object: nil)
|
|
@@ -115,6 +116,7 @@ class NCViewerMediaPage: UIViewController {
|
|
|
NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterDownloadedFile), object: nil)
|
|
|
NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterProgressTask), object: nil)
|
|
|
|
|
|
+ NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterUploadStartFile), object: nil)
|
|
|
NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterUploadedFile), object: nil)
|
|
|
|
|
|
NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterHidePlayerToolBar), object: nil)
|
|
@@ -232,6 +234,20 @@ class NCViewerMediaPage: UIViewController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @objc func uploadStartFile(_ notification: NSNotification) {
|
|
|
+
|
|
|
+ guard let userInfo = notification.userInfo as NSDictionary?,
|
|
|
+ let serverUrl = userInfo["serverUrl"] as? String,
|
|
|
+ let fileName = userInfo["fileName"] as? String,
|
|
|
+ let sessionSelector = userInfo["sessionSelector"] as? String
|
|
|
+ else { return }
|
|
|
+
|
|
|
+ let metadata = metadatas[currentIndex]
|
|
|
+ if metadata.serverUrl == serverUrl, metadata.fileName == fileName, metadata.classFile == NCCommunicationCommon.typeClassFile.video.rawValue, sessionSelector == NCGlobal.shared.selectorUploadFileNODelete {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@objc func uploadedFile(_ notification: NSNotification) {
|
|
|
|
|
|
guard let userInfo = notification.userInfo as NSDictionary?,
|