using System;
using System.Collections.Generic;
using System.Text;

namespace ID3Tagger
{
    class ID3Tagger
    {
        static void Main(string[] args)
        {
            if (args.Length != 2)
            {
                Console.WriteLine("using: ./ID3Tagger.exe Album Albuminterpret");
                Console.ReadKey();
            }
            else
            {
                String Path = System.Threading.Thread.GetDomain().BaseDirectory;
                String Album = args[0];
                String[] AlbumArtists = { args[1] };
                String[] mp3Files = System.IO.Directory.GetFiles(Path);
                for (Int32 i = 0; i < mp3Files.Length; i++)
                {
                    if (mp3Files[i].EndsWith(".mp3"))
                    {
                        TagLib.File mp3 = TagLib.File.Create(mp3Files[i]);
                        mp3.Mode = TagLib.File.AccessMode.Write;
                        mp3.Tag.Album = Album;
                        mp3.Tag.AlbumArtists = AlbumArtists;
                        mp3.Save();
                        mp3.Mode = TagLib.File.AccessMode.Closed;
                    }
                }
            }


        }
    }
}
