Beispiel #1
0
        private void SaveToFile()
        {
            ID3TagV1 id3v1 = new ID3TagV1();

            id3v1.Read(this.currentMedia.Filename);

            id3v1.Title  = this.tbTitle.Text.Trim();
            id3v1.Artist = this.tbArtist.Text.Trim();
            id3v1.Album  = this.tbAlbum.Text.Trim();

            string genre = this.tbGenre.Text.Trim();

            if (Enum.IsDefined(typeof(Tagger.MusicalGenres), genre))
            {
                id3v1.Genre = (Tagger.MusicalGenres)Enum.Parse(typeof(Tagger.MusicalGenres), genre, true);
            }

            id3v1.Year = this.tbYear.Text;

            string track = this.tbTrack.Text.Trim();
            int    trackOk;

            if (int.TryParse(track, out trackOk))
            {
                id3v1.Track = trackOk;
            }

            id3v1.Write();
        }
Beispiel #2
0
        /// <summary>
        /// Initializes an object that reads informations from an mp3 file and stores them into the given database.
        /// </summary>
        public Id3SongCreator(ShauniDatabase database)
        {
            this.database       = database;
            this.id3v1          = new ID3TagV1();
            this.id3v2          = new ID3TagV2();
            this.mpegHeader     = new MpegHeader();
            this.UseNewStandard = false;

            this.idwav = new IDWav();
        }