@@ -19,27 +19,27 @@ param(
1919[Parameter (Mandatory , ValueFromPipelineByPropertyName )]
2020[ComponentModel.DefaultBindingProperty (' sceneName' )]
2121[string ]
22- $sceneName ,
22+ $SceneName ,
2323<# Name of the new input to created #>
2424[Parameter (Mandatory , ValueFromPipelineByPropertyName )]
2525[ComponentModel.DefaultBindingProperty (' inputName' )]
2626[string ]
27- $inputName ,
27+ $InputName ,
2828<# The kind of input to be created #>
2929[Parameter (Mandatory , ValueFromPipelineByPropertyName )]
3030[ComponentModel.DefaultBindingProperty (' inputKind' )]
3131[string ]
32- $inputKind ,
32+ $InputKind ,
3333<# Settings object to initialize the input with #>
3434[Parameter (ValueFromPipelineByPropertyName )]
3535[ComponentModel.DefaultBindingProperty (' inputSettings' )]
3636[PSObject ]
37- $inputSettings ,
37+ $InputSettings ,
3838<# Whether to set the created scene item to enabled or disabled #>
3939[Parameter (ValueFromPipelineByPropertyName )]
4040[ComponentModel.DefaultBindingProperty (' sceneItemEnabled' )]
4141[switch ]
42- $sceneItemEnabled ,
42+ $SceneItemEnabled ,
4343# If set, will return the information that would otherwise be sent to OBS.
4444[Parameter (ValueFromPipelineByPropertyName )]
4545[Alias (' OutputRequest' , ' OutputInput' )]
@@ -98,24 +98,14 @@ process {
9898 }
9999 }
100100 }
101-
102101
103- # If we don't have a request counter for this request type
104- if (-not $script :ObsRequestsCounts [$myRequestType ]) {
105- # initialize it to zero.
106- $script :ObsRequestsCounts [$myRequestType ] = 0
107- }
108- # Increment the counter for requests of this type
109- $script :ObsRequestsCounts [$myRequestType ]++
110-
111102 # and make a request ID from that.
112- $myRequestId = " $myRequestType .$ ( $script :ObsRequestsCounts [$myRequestType ]) "
113-
103+ $myRequestId = " $myRequestType .$ ( [Guid ]::newGuid()) "
114104
115105 # Construct the payload object
116106 $requestPayload = [Ordered ]@ {
117107 # It must include a request ID
118- requestId = " $myRequestType . $ ( $ script :ObsRequestsCounts [ $myRequestType ] ) "
108+ requestId = $myRequestId
119109 # request type
120110 requestType = $myRequestType
121111 # and optional data
0 commit comments