Skip to content

Commit 1bef256

Browse files
StartAutomatingStartAutomating
authored andcommitted
OBS Source Commands - Fixing -NoResponse (Fixes #136)
Also fixing Add vs Set return behaviors
1 parent 8364c66 commit 1bef256

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Commands/Sources/Set-OBSColorSource.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ function Set-OBSColorSource {
130130
inputName = $myParameters["Name"]
131131
inputKind = "color_source_v3"
132132
inputSettings = $myParameterData
133+
NoResponse = $myParameters["NoResponse"]
133134
}
134135

135136
# If -SceneItemEnabled was passed,
@@ -182,7 +183,8 @@ function Set-OBSColorSource {
182183
}
183184
}
184185
# Otherwise, if we had a result
185-
elseif ($outputAddedResult) {
186+
if ($outputAddedResult -and
187+
$outputAddedResult -isnot [Management.Automation.ErrorRecord]) {
186188
# get the input from the scene.
187189
Get-OBSSceneItem -sceneName $myParameters["Scene"] |
188190
Where-Object SourceName -eq $myParameters["Name"]

0 commit comments

Comments
 (0)