TagLib:将字符串写入RemixedBy字段
本文关键字:RemixedBy 字段 字符串 TagLib | 更新日期: 2023-09-27 18:11:50
我正在用c#编写一个简单的程序来整理Traktor呈现的歌曲信息。据我所知,Traktor从id3标签中获取这些数据。
现在的问题是,我不知道如何通过TagLib解决"remix By/Modified By"字段。当我检查TagLib实例的可能性(track.Tag.[options])时,没有合适的选项。
就标题和艺术家而言,我已经很成功了。信息来自文件名。下面是完成这个任务的代码:
TagLib.File track = TagLib.File.Create(selectedSongFullPath);
TitleToBeChecked = Path.GetFileNameWithoutExtension(selectedSongFullPath);
if (TitleToBeChecked.Contains("-"))
{
int hyphenIndex = TitleToBeChecked.IndexOf("-");
string title = TitleToBeChecked.Substring(hyphenIndex + 1).Trim();
string contributingArtists = TitleToBeChecked.Substring(0, hyphenIndex).Trim();
track.Tag.Title = title;
string[] contributingArtistsArray = {contributingArtists};
track.Tag.Performers = contributingArtistsArray;
track.Save();
}
任何帮助都将非常感激。
亲切的问候
根据id3(v2)规范,关于Remixes的信息属于文本信息框架:
TPE4
The 'Interpreted, remixed, or otherwise modified by' frame contains more information about the people behind a remix and similar interpretations of another existing piece.
来源:http://id3.org/id3v2.3.0