obs-powershell icon indicating copy to clipboard operation
obs-powershell copied to clipboard

OBS Sources should support noun-oriented use

Open StartAutomating opened this issue 2 years ago • 0 comments
trafficstars

Each of the existing OBS source commands is both an Add and a Set, and acts slightly differently depending on each case (Set will changing existing instances without -Force, Add will only create an instance).

If we also aliased these commands to Get-, we could simplify getting sources of a type, and provide a noun-oriented syntax to manipulate the sources.

As long as there are not any mandatory parameters to the source, this should be possible by using $myInvocation.InvocationName to determine which name we were called with, and remap parameters accordingly.

Since all sources can have a -Name, we can allow this parameter to be a special case that filters inputs of that type by name. If any other parameters were passed (and we were not explicitly called as "Get"), we can all items and then pipe each item back to the command, thus enabling batch operations.

  • [ ] #146
  • [ ] #147
  • [ ] #148
  • [ ] #149
  • [ ] #150
  • [ ] #151
  • [ ] #152

StartAutomating avatar Sep 08 '23 02:09 StartAutomating