Remember recent destinations in queue options.
This commit is contained in:
12 files changed
+321
-397
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user