Пример #1
0
 public static void DumpId3V2Metadata(File tagFile)
 {
     TagLib.Id3v2.Tag tags = (TagLib.Id3v2.Tag)tagFile.GetTag(TagTypes.Id3v2);
     foreach (SimpleFrame f in tags.Select(f => new SimpleFrame(f)).OrderBy(f => f.FrameId))
     {
         if (f.Value.Length > 1)
         {
             Console.WriteLine("{0} ({1}):", f.FrameId, f.Value.Length);
             foreach (string fv in f.Value)
             {
                 WriteLineWithIndent(4, fv);
             }
         }
         else if (f.Value.Length == 1)
         {
             Console.WriteLine("{0}:", f.FrameId);
             WriteLineWithIndent(4, f.Value[0]);
         }
         else
         {
             Console.WriteLine("{0} (No Value)", f.FrameId);
         }
     }
 }