2014-07-08 57 views
0

我正在用C#編寫一個簡單的程序來整理由Traktor提供的歌曲信息。就我所知,Traktor從ID3標籤獲取這些數據。TagLib:將字符串寫入RemixedBy字段

現在的問題是,我不知道如何通過TagLib解決「重新混合/修改者」字段。當我檢查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(); 
     } 

任何幫助將非常感激。

親切的問候

回答

0

按照ID3(v2)的說明書中,關於混音信息屬於文本信息幀:

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

+0

泰用於具有看看它。我一直在尋找這個方向,儘管我不知道如何通過使用帶有TagLib的frameid來解決/使用/編輯。 – bitwave

+0

也許在這個答案中的代碼(在C++中)可以給你一個想法:http://stackoverflow.com/questions/16628798/taglib-how-to-edit-album-artist/16630372 – PeterCo