TagLib is not saving ID3 Tags

318 Views Asked by At

I have a problem with TagLibSharp v2.2.0. I’ve been looking for solutions on the internet for quite some time. In the process I found things like e.g. which can force TagLib to save in a specific version

TagLib. Id3v2. Day. DefaultVersion = 3;
TagLib. Id3v2. Day. ForceDefaultVersion = true;

Or how it may be that the file has a .mp3 extension, but is not a proper Mp3 file. I’ve looked into a hex editor, and my file starts at 49 44 33, so it should also be a proper Mp3 file.

TagLib.Id3v2.Tag.DefaultVersion = 3;
TagLib.Id3v2.Tag.ForceDefaultVersion = true;

var Mp3File = TagLib.File.Create(customPath, TagLib.ReadStyle.Average);

Mp3File.Tag.Performers = new string[] { "Billy Bob" };
Mp3File.Tag.Title = "Silly Job";

//If I display a messagebox at the point here, which shows the Performers and Title of the Mp3File
//it shows the correct text (Billy Bob, Silly Job)
MessageBox.Show($"{Mp3File.Tag.Performers}, {Mp3File.Tag.Title}");

Mp3File.Save();
Mp3File.Dispose();

When I run the code, there is no exception, but when I look at the file details, nothing has changed. Does anyone have any idea what this could be about?

0

There are 0 best solutions below