Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions MilestonePSTools/Public/Reports/Get-VmsCameraReport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -154,24 +154,11 @@ function Get-VmsCameraReport {
}
$recorder.FillChildren($itemTypes, $itemFilters)

# TODO: Remove this after TFS 447559 is addressed. The StreamFolder.Streams collection is empty after using FillChildren
# So this entire foreach block is only necessary to flush the children of StreamFolder and force another query for every
# camera so we can fill the collection up in this background task before enumerating over everything at the end.
foreach ($hw in $recorder.hardwarefolder.hardwares) {
if ($getPasswords) {
$password = $hw.ReadPasswordHardware().GetProperty('Password')
$cache.Passwords[[guid]$hw.Id] = $password
}
foreach ($cam in $hw.camerafolder.cameras) {
try {
if ($null -ne $cam.StreamFolder -and $cam.StreamFolder.Streams.Count -eq 0) {
$cam.StreamFolder.ClearChildrenCache()
$null = $cam.StreamFolder.Streams
}
} catch {
Write-Error $_
}
}
}
} catch {
Write-Error $_
Expand Down
Loading