0

I have been trying to read/write metadata of mp3 files.I searched around a bit and found out i could use Taglibsharp in order to do it.Reading the metadata works perfectly however when i try to write in order to change a tag for example the title nothing happens.Also there is no documentation for taglibsharp so if someone who has previously used it knows what i can do , please help me.Thanks in advance!
Some code:

var tfile = TagLib.File.Create(songPath);
//Reading: works perfectly
string title = tfile.Tag.Title;
//writing: does nothing
tfile.Tag.Title = "A title";
kazz
  • 21
  • 2

1 Answers1

0

You need to call the .Save() method:

using (var tfile = TagLib.File.Create(songPath))
{
    tfile.Tag.Title = "A title";
    tfile.Save();
}
Xiaoy312
  • 14,292
  • 1
  • 32
  • 44