Update send to feature to send to TV app on 10.15.

This commit is contained in:
Damiano Galassi committed 2019-10-15 08:34:35 +02:00
1 parent 6bb26182ba
commit dbe5080541
9 files changed
+112 -77

No files matched your search

+2 -10
View File
@@ -254,16 +254,8 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
// MARK: Actions
@IBAction func sendToExternalApp(_ sender: Any) {
if let filePath = doc.fileURL?.path, let script = NSAppleScript(source: """
tell application "iTunes" to add (POSIX file "\(filePath)")
""") {
let result = automationConsent(bundleIdentifier: "com.apple.iTunes", promptIfNeeded: true)
if result == .granted {
var error: NSDictionary?
script.executeAndReturnError(&error)
}
if let fileURL = doc.fileURL {
_ = sendToFileExternalApp(fileURL: fileURL)
}
}