add quick.ps1 to gitignore

run formatter on files
This commit is contained in:
onyx-and-iris 2022-06-25 15:20:36 +01:00
parent 4417075330
commit 8429fed8b4
12 changed files with 122 additions and 122 deletions

3
.gitignore vendored
View File

@ -1,2 +1,5 @@
# quick test
quick.ps1
lib/*.psd1 lib/*.psd1
**/*.log **/*.log

View File

@ -203,7 +203,7 @@ The following methods are available:
- pause - pause
- record - record
- ff - ff
- rw - rew
The following properties accept boolean values. The following properties accept boolean values.

View File

@ -11,8 +11,7 @@ class Remote {
[Object]$profiles [Object]$profiles
# Constructor # Constructor
Remote ([String]$kind) Remote ([String]$kind) {
{
$this.kind = $kind $this.kind = $kind
$this.Setup() $this.Setup()
} }

View File

@ -213,7 +213,8 @@ Function Get_Profiles {
$basepath = Join-Path -Path $(Split-Path -Path $PSScriptRoot) -ChildPath "profiles" $basepath = Join-Path -Path $(Split-Path -Path $PSScriptRoot) -ChildPath "profiles"
if (Test-Path $basepath) { if (Test-Path $basepath) {
$fullpath = Join-Path -Path $basepath -ChildPath $layout.name $fullpath = Join-Path -Path $basepath -ChildPath $layout.name
} else {return $null} }
else { return $null }
$filenames = @(Get-ChildItem -Path $fullpath -Filter *.psd1 -Recurse -File) $filenames = @(Get-ChildItem -Path $fullpath -Filter *.psd1 -Recurse -File)
if ($filenames) { if ($filenames) {
@ -267,7 +268,8 @@ Function Login {
'potato' { 'potato' {
if ([Environment]::Is64BitOperatingSystem) { if ([Environment]::Is64BitOperatingSystem) {
$vm_exe = 6 $vm_exe = 6
} else { $vm_exe = 3 } }
else { $vm_exe = 3 }
Break Break
} }
Default { throw [LoginError]::new('Unknown Voicemeeter type') } Default { throw [LoginError]::new('Unknown Voicemeeter type') }
@ -277,9 +279,11 @@ Function Login {
if (-not $retval) { Write-Host("STARTING VOICEMEETER") } if (-not $retval) { Write-Host("STARTING VOICEMEETER") }
else { Throw [CAPIError]::new($retval, $MyInvocation.MyCommand) } else { Throw [CAPIError]::new($retval, $MyInvocation.MyCommand) }
Start-Sleep -s 1 Start-Sleep -s 1
} elseif ($retval -eq -2) { }
elseif ($retval -eq -2) {
throw [LoginError]::new('Login may only be called once per session') throw [LoginError]::new('Login may only be called once per session')
} else { Exit } }
else { Exit }
} }
catch [LoginError], [CAPIError] { catch [LoginError], [CAPIError] {
Write-Warning $_.Exception.ErrorMessage() Write-Warning $_.Exception.ErrorMessage()

View File

@ -4,8 +4,7 @@ class Bus {
[Int]$id [Int]$id
# Constructor # Constructor
Bus ([Int]$id) Bus ([Int]$id) {
{
$this.id = $id $this.id = $id
AddBoolMembers -PARAMS @('mono', 'mute') AddBoolMembers -PARAMS @('mono', 'mute')

View File

@ -2,8 +2,7 @@
class Special { class Special {
# Constructor # Constructor
Special() Special() {
{
AddActionMembers -PARAMS @('restart', 'shutdown', 'show') AddActionMembers -PARAMS @('restart', 'shutdown', 'show')
} }

View File

@ -2,8 +2,7 @@ class MacroButton {
[int32]$id [int32]$id
# Constructor # Constructor
MacroButton ([Int]$id) MacroButton ([Int]$id) {
{
$this.id = $id $this.id = $id
} }

View File

@ -2,9 +2,8 @@
class Recorder { class Recorder {
# Constructor # Constructor
Recorder() Recorder() {
{ AddActionMembers -PARAMS @('play', 'stop', 'pause', 'replay', 'record', 'ff', 'rew')
AddActionMembers -PARAMS @('play', 'stop', 'pause', 'replay', 'record', 'ff', 'rw')
AddChannelMembers AddChannelMembers
} }

View File

@ -3,8 +3,7 @@
class Strip { class Strip {
[Int]$id [Int]$id
Strip ([Int]$id) Strip ([Int]$id) {
{
$this.id = $id $this.id = $id
AddBoolMembers -PARAMS @('mono', 'solo', 'mute') AddBoolMembers -PARAMS @('mono', 'solo', 'mute')

View File

@ -3,8 +3,7 @@ class Vban {
[String]$direction [String]$direction
# Constructor # Constructor
Vban($id) Vban($id) {
{
$this.id = $id $this.id = $id
} }