Subler Automation Support (#67)
Expand the AppleScript dictionary to support many additional commands.
This commit is contained in:
1 parent
20a8714974
commit
d88285ece2
8 files changed
+1134
-110
No files matched your search
@@ -45,3 +45,27 @@ import Foundation
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@objc(SBQueueRemoveCompletedScriptCommand) class QueueRemoveCompletedScriptCommand: NSScriptCommand {
|
||||
|
||||
@MainActor override func performDefaultImplementation() -> Any? {
|
||||
QueueController.shared.removeCompletedItems(self)
|
||||
return nil
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@objc(SBQueueStatusScriptCommand) class SBQueueStatusScriptCommand: NSScriptCommand {
|
||||
|
||||
@MainActor override func performDefaultImplementation() -> Any? {
|
||||
switch QueueController.shared.status {
|
||||
case .unknown:
|
||||
return 0 // idle
|
||||
case .working:
|
||||
return 1 // running
|
||||
case .completed:
|
||||
return 2 // completed
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user