Get-MediaInfo icon indicating copy to clipboard operation
Get-MediaInfo copied to clipboard

Piping Get-ChildItem to Get-MediaInfoValue causes errors but no breakage

Open HASJ opened this issue 3 years ago • 1 comments

gci | gmiv -kind video -parameter CodecID | ogv

New-Object: D:\Documentos\PowerShell\Modules\Get-MediaInfo\3.7\Get-MediaInfo.psm1:193
Line |
 193 |  …       $mi = New-Object MediaInfoSharp -ArgumentList (Convert-Path -Li …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling ".ctor" with "1" argument(s): "Error MediaInfo_Open"

InvalidOperation: D:\Documentos\PowerShell\Modules\Get-MediaInfo\3.7\Get-MediaInfo.psm1:194
Line |
 194 |          $value = $mi.GetInfo($Kind, $Index, $Parameter)
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | You cannot call a method on a null-valued expression.

InvalidOperation: D:\Documentos\PowerShell\Modules\Get-MediaInfo\3.7\Get-MediaInfo.psm1:195
Line |
 195 |          $mi.Dispose()
     |          ~~~~~~~~~~~~~
     | You cannot call a method on a null-valued expression.

HASJ avatar Apr 28 '21 23:04 HASJ

I think the problem is it tries to process any input like folders and non-media files.

stax76 avatar May 02 '21 11:05 stax76