Where can I find tag lib sharp examples?

前端 未结 1 1981
说谎
说谎 2020-12-05 02:31

I have been searching for ID3 editors for my music manager project. It seems that taglib sharp is the popular choice. I googled a lot and could not find any

相关标签:
1条回答
  • 2020-12-05 03:25

    Well without knowing exactly what you want to do all I can offer is my code.

    You create a TagLib File object from the actual mp3 file. This reads the file and extracts the tag data:

    TagLib.File tagFile = TagLib.File.Create(track); // track is the name of the mp3
    

    Then to get a tag value:

    uint year = tagFile.Tag.Year;
    

    You set the tags like this:

    tagFile.Tag.Year = year;
    

    and then save the changes:

    tagFile.Save();
    
    0 讨论(0)
提交回复
热议问题