trossr32 / ps-transmission

A Powershell module that integrates with the Transmission RPC API
https://www.powershellgallery.com/packages/Transmission
Mozilla Public License 2.0
21 stars 1 forks source link

Get-TransmissionTorrents pipeline output always contains only one object #16

Closed scottmckenzie closed 2 years ago

scottmckenzie commented 2 years ago

Transmission module version:

PS /> Get-Module -Name Transmission 

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     1.0.9                 Transmission                        {Add-TransmissionTorrents, Assert-Transmiss…

PowerShell version:

PS /> $host

Name             : ConsoleHost
Version          : 7.2.5
InstanceId       : 89e6eb72-a355-47e3-b6dd-cf7726079002
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-AU
CurrentUICulture : en-AU
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

When calling Get-TransmissionTorrents the pipeline output always contains only one object:

PS /> Get-TransmissionTorrents | Measure-Object

Count             : 1
Average           : 
Sum               : 
Maximum           : 
Minimum           : 
StandardDeviation : 
Property          : 

If I use Where-Object to filter the pipeline output, I get the exact same result as if I hadn't applied a filter.

As a workaround, I can assign the result of Get-TransmissionTorrents to a variable. I then get the expected number of torrents:

PS /> $t = Get-TransmissionTorrents
PS /> $t | Measure-Object

Count             : 46
Average           : 
Sum               : 
Maximum           : 
Minimum           : 
StandardDeviation : 
Property          : 
trossr32 commented 2 years ago

Thanks for raising, fixed with v1.1.0