mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-03-20 08:59:10 +00:00
improve speed of Select-String
device config is at the very top of the xml, so this should be much faster
This commit is contained in:
parent
defb2b68c0
commit
1f5b52b439
@ -125,7 +125,7 @@ class IODevice : IRemote {
|
|||||||
$newTime = (Get-Item $path).LastWriteTime
|
$newTime = (Get-Item $path).LastWriteTime
|
||||||
if ($newTime -gt $oldTime) {
|
if ($newTime -gt $oldTime) {
|
||||||
try {
|
try {
|
||||||
$line = Get-Content $path | Select-String -Pattern "<$($this.kindOfDevice)Dev index='$($this.index + 1)'"
|
$line = Get-Content $path | Select-String -Pattern "<$($this.kindOfDevice)Dev index='$($this.index + 1)'" -List
|
||||||
if ($line) { break }
|
if ($line) { break }
|
||||||
}
|
}
|
||||||
catch {}
|
catch {}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user