我使用的代码......
For Each file As String In My.Computer.FileSystem.GetFiles(directory)
Dim fi As FileInfo = New FileInfo(file)
If isNotMusic(fi.Extension.ToString) = True Then Continue For 'Checks file extension for non-music files; if test is true for-loop continues with next file
trackCounter += 1 'Adds 1 to trackCounter
Dim song As New musicInfo
Dim tagFile As TagLib.File = TagLib.File.Create(fi.FullName)
infoArtist = tagFile.Tag.Performers(0)
With song
.track = tagFile.Tag.Track
.title = tagFile.Tag.Title
.artist = tagFile.Tag.Performers(0)
.album = tagFile.Tag.Album
.extension = fi.Extension.ToString
End With
songs.Add(song)
Next
当我在充满AC / DC歌曲的文件夹上使用此代码时,tagFile.Tag.Performers(0)返回" AC"。
我在其他地方查找了这个问题,从我看到的情况来看,只有其他标记解决方案(如MpTagThat和MP1)有addressed this problem并制作补丁。
我知道Performers标签是一个阵列而另一半是" DC"可能存储在tagFile.Tag.Performers(1)中。但是,我最终将把每个艺术家与一个&#34 ;;"在我的代码中,如果我按原样保留所有内容,AC / DC将返回为" AC; DC"。