Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
HASJ opened this issue Apr 28, 2021 · 1 comment
Open

Comments

@HASJ
Copy link

HASJ commented Apr 28, 2021

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.
@stax76
Copy link
Owner

stax76 commented May 2, 2021

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

@stax76 stax76 closed this as completed May 2, 2021
@stax76 stax76 reopened this May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants