Skip to content

Commit 8364c66

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

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Commands/Sources/Set-OBSBrowserSource.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ function Set-OBSBrowserSource {
174174
inputKind = "browser_source"
175175
inputSettings = $myParameterData
176176
inputName = $Name
177+
NoResponse = $myParameters["NoResponse"]
177178
}
178179
# If -SceneItemEnabled was passed,
179180
if ($myParameters.Contains('SceneItemEnabled')) {
@@ -226,7 +227,8 @@ function Set-OBSBrowserSource {
226227
}
227228
}
228229
# Otherwise, if we had a result
229-
elseif ($outputAddedResult) {
230+
if ($outputAddedResult -and
231+
$outputAddedResult -isnot [Management.Automation.ErrorRecord]) {
230232
# get the input from the scene.
231233
Get-OBSSceneItem -sceneName $myParameters["Scene"] |
232234
Where-Object SourceName -eq $myParameters["Name"]

0 commit comments

Comments
 (0)