Remember recent destinations in queue options.

This commit is contained in:
Damiano Galassi committed 2018-03-16 18:11:21 +01:00
1 parent 571c276c2f
commit 2f64ac7a22
12 files changed
+321 -397

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
//
// QueueScriptCommand.swift
// Subler
//
// Created by Damiano Galassi on 16/03/2018.
//
import Foundation
@objc(SBQueueScriptCommand) class QueueScriptCommand: NSScriptCommand {
override func performDefaultImplementation() -> Any? {
guard let args = directParameter as? [URL] else { return nil }
SBQueueController.sharedManager.addItems(from: args, at: 0)
return nil
}
}
@objc(SBQueueStartScriptCommand) class QueueStartScriptCommand: NSScriptCommand {
override func performDefaultImplementation() -> Any? {
SBQueueController.sharedManager.start(self)
self.suspendExecution()
return nil
}
}
@objc(SBQueueStopScriptCommand) class QueueStopScriptCommand: NSScriptCommand {
override func performDefaultImplementation() -> Any? {
SBQueueController.sharedManager.stop(self)
return nil
}
}