- override func performDefaultImplementation() -> Any? {
- print("AAAH \(self.directParameter)")
-
- guard let args = self.directParameter as? [String: Any] else {
- return nil
- }
-
- print("AAH COMMANDS \(args)")
-
- // Here you can extract the parameters from the args dictionary and configure your settings
- let x = args["x"] as? Int
- let y = args["y"] as? Int
- let width = args["width"] as? Int
- let height = args["height"] as? Int
- let preventResize = args["prevent_resize"] as? Bool
- let preventMove = args["prevent_move"] as? Bool
- let fps = args["fps"] as? Int
- let outputs = OutputFormatSetting(args["outputs"] as? String ?? "")
- let backend = URL(string: args["backend"] as? String ?? "")
- let backendOutput = OutputFormatSetting(args["backend_output"] as? String ?? "")
- let keepLocalFiles = args["keep_local_files"] as? Bool
- let autoStart = args["auto_start"] as? Bool
- let maxLength = args["max_length"] as? Int
-
- print("AAH WIDTH \(width)")
-
- var skipBackend = false
- if let backendString = args["backend"] as? String {
- if backendString == "" {
- skipBackend = true
- }
+ override func performDefaultImplementation() -> Any? {
+
+ let args = self.directParameter as? [String: Any] ?? [:]
+
+ // Here you can extract the parameters from the args dictionary and configure your settings
+ let x = args["x"] as? Int
+ let y = args["y"] as? Int
+ let width = args["width"] as? Int
+ let height = args["height"] as? Int
+ let preventResize = args["prevent_resize"] as? Bool
+ let preventMove = args["prevent_move"] as? Bool
+ let fps = args["fps"] as? Int
+ let outputs = OutputFormatSetting(args["outputs"] as? String ?? "")
+ let backend = URL(string: args["backend"] as? String ?? "")
+ let backendOutput = OutputFormatSetting(args["backend_output"] as? String ?? "")
+ let keepLocalFiles = args["keep_local_files"] as? Bool
+ let autoStart = args["auto_start"] as? Bool
+ let maxLength = args["max_length"] as? Int
+
+ var skipBackend = false
+ if let backendString = args["backend"] as? String {
+ if backendString == "" {
+ skipBackend = true