I want to change the album name for wav files, but it doesn’t work and i don’t know why. 🙁
public void ChangeMetadata()
{
string artistName = ArtistNameTB.Text;
string destinationPath = DestinationPathTB.Text;
string albumName = AlbumNameTB.Text;
foreach (string file in FolderPathTab)
{
string fileName = Path.GetFileName(file);
string destinationFilePath = Path.Combine(destinationPath, fileName);
System.IO.File.Copy(file, destinationFilePath, true);
using (var tagLibFile = TagLib.File.Create(destinationFilePath))
{
if (!String.IsNullOrEmpty(ArtistNameTB.Text) || ArtistNameTB.Text != "")
{
tagLibFile.Tag.AlbumArtists = new[] { artistName };
}
tagLibFile.Tag.Album = albumName;
tagLibFile.Save();
}
}
I’ve already searched the internet for a solution but couldn’t find one.
New contributor
Switek77 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.