jherby2k / AudioWorks

A cross-platform, multi-format audio conversion and tagging suite
GNU Affero General Public License v3.0
63 stars 6 forks source link

Get-AudioFile does not support square brackets [] in path #45

Open flemmingss opened 1 year ago

flemmingss commented 1 year ago

This does not work:

PS C:\Windows\system32> [string]$file = "\\10.0.24.10\share_media\media\music\qobuz_source\SvartePetter\SvartePetter - Jeg er tilbake (2010) [FLAC] [16B-44.1kHz]\02. SvartePetter - Vanlig (Explicit).flac"
PS C:\Windows\system32> Get-AudioFile -Path $file | Get-AudioMetadata
Get-AudioFile : The specified wildcard character pattern is not valid: SvartePetter - Jeg er tilbake (2010) [FLAC]
[16B-44.1kHz]
At line:1 char:1
+ Get-AudioFile -Path $file | Get-AudioMetadata
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-AudioFile], WildcardPatternException
    + FullyQualifiedErrorId : RuntimeException,AudioWorks.Commands.GetAudioFileCommand

The issue is these square brackets in the path: [FLAC] [16B-44.1kHz] If I replace with normal parenthesis it works:

PS C:\Windows\system32> [string]$file = "\\10.0.24.10\share_media\media\music\qobuz_source\SvartePetter\SvartePetter - Jeg er tilbake (2010) (FLAC) (16B-44.1kHz)\02. SvartePetter - Vanlig (Explicit).flac"
PS C:\Windows\system32> Get-AudioFile -Path $file | Get-AudioMetadata

Title       : Vanlig
Artist      : SvartePetter
Album       : Jeg er tilbake
AlbumArtist : SvartePetter
Composer    : Xtatic; tom12"; euphonius; endless; oral bee; dat music
Genre       : Rap
Comment     :
Day         : 10
Month       : 05
Year        : 2010
TrackNumber : 02
TrackCount  : 19
TrackPeak   :
AlbumPeak   :
TrackGain   :  dB
AlbumGain   :  dB

Should be supported, found the issue by reading this one: https://stackoverflow.com/questions/20854896/the-specified-wildcard-pattern-is-not-valid-warnings