Skip to content

Commit bf8a21d

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

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Commands/Sources/Set-OBSVLCSource.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ function Set-OBSVLCSource {
192192
inputKind = "vlc_source"
193193
inputSettings = $myParameterData
194194
inputName = $Name
195+
NoResponse = $myParameters["NoResponse"]
195196
}
196197
if ($myParameters.Contains('SceneItemEnabled')) {
197198
$addSplat.SceneItemEnabled = $myParameters['SceneItemEnabled'] -as [bool]
@@ -240,8 +241,10 @@ function Set-OBSVLCSource {
240241
$psCmdlet.WriteError($outputAddedResult)
241242
}
242243
}
244+
243245
# Otherwise, if we had a result
244-
elseif ($outputAddedResult) {
246+
if ($outputAddedResult -and
247+
$outputAddedResult -isnot [Management.Automation.ErrorRecord]) {
245248
# get the input from the scene and optionally fit it to the screen.
246249
Get-OBSSceneItem -sceneName $myParameters["Scene"] |
247250
Where-Object SourceName -eq $name |

0 commit comments

Comments
 (0)