Skip to content

Commit e1b9464

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

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Commands/Sources/Set-OBSMediaSource.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ function Set-OBSMediaSource {
172172
inputKind = "ffmpeg_source"
173173
inputSettings = $myParameterData
174174
inputName = $Name
175+
NoResponse = $myParameters["NoResponse"]
175176
}
176177
if ($myParameters.Contains('SceneItemEnabled')) {
177178
$addSplat.SceneItemEnabled = $myParameters['SceneItemEnabled'] -as [bool]
@@ -220,8 +221,9 @@ function Set-OBSMediaSource {
220221
$psCmdlet.WriteError($outputAddedResult)
221222
}
222223
}
224+
223225
# Otherwise, if we had a result
224-
elseif ($outputAddedResult) {
226+
if ($outputAddedResult -isnot [Management.Automation.ErrorRecord]) {
225227
# get the input from the scene and optionally fit it to the screen.
226228
Get-OBSSceneItem -sceneName $myParameters["Scene"] |
227229
Where-Object SourceName -eq $name |

0 commit comments

Comments
 (0)