Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我一直在为我的音乐管理器项目寻找 ID3 编辑器。似乎taglib sharp是流行的选择。我用谷歌搜索了很多,找不到任何使用它的例子。
有人可以指出一些显示图书馆使用情况的例子吗?
好吧,在不知道你想做什么的情况下,我所能提供的只是我的代码。
TagLib您从实际的 mp3 文件创建一个File 对象。这将读取文件并提取标签数据:
TagLib
TagLib.File tagFile = TagLib.File.Create(track); // track is the name of the mp3
然后获取标签值:
uint year = tagFile.Tag.Year;
您可以这样设置标签:
tagFile.Tag.Year = year;
然后保存更改:
tagFile.Save();