浏览代码

Merge pull request #2421 from nextcloud/sub-video

fix
Marino Faggiana 1 年之前
父节点
当前提交
ae1db04dc1
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift

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

@@ -366,6 +366,7 @@ extension NCPlayerToolBar {
                 on: false,
                 action: { _ in
 
+                    guard let metadata = self.metadata else { return }
                     let storyboard = UIStoryboard(name: "NCSelect", bundle: nil)
                     let navigationController = storyboard.instantiateInitialViewController() as! UINavigationController
                     let viewController = navigationController.topViewController as! NCSelect
@@ -375,6 +376,7 @@ extension NCPlayerToolBar {
                     viewController.includeDirectoryE2EEncryption = false
                     viewController.enableSelectFile = true
                     viewController.type = "subtitle"
+                    viewController.serverUrl = metadata.serverUrl
 
                     self.viewerMediaPage?.present(navigationController, animated: true, completion: nil)
                 }
@@ -429,6 +431,7 @@ extension NCPlayerToolBar {
                 on: false,
                 action: { _ in
 
+                    guard let metadata = self.metadata else { return }
                     let storyboard = UIStoryboard(name: "NCSelect", bundle: nil)
                     let navigationController = storyboard.instantiateInitialViewController() as! UINavigationController
                     let viewController = navigationController.topViewController as! NCSelect
@@ -438,6 +441,7 @@ extension NCPlayerToolBar {
                     viewController.includeDirectoryE2EEncryption = false
                     viewController.enableSelectFile = true
                     viewController.type = "audio"
+                    viewController.serverUrl = metadata.serverUrl
 
                     self.viewerMediaPage?.present(navigationController, animated: true, completion: nil)
                 }