Exemplo n.º 1
0
        private void AddArtists(EditInfo item)
        {
            List <string> artists = new List <string>();

            if (!string.IsNullOrWhiteSpace(item.Artist))
            {
                artists.Add(item.Artist);
            }
            if (!string.IsNullOrWhiteSpace(item.CoArtist))
            {
                artists.Add(item.CoArtist);
            }
            item.File.Tag.Performers = artists.ToArray();
        }
Exemplo n.º 2
0
 private void UpdateTags(EditInfo item)
 {
     item.File.Tag.Album = item.Album;
     item.File.Tag.Title = item.Title;
     AddArtists(item);
     if (item.Track.HasValue)
     {
         item.File.Tag.Track = item.Track.Value;
     }
     if (item.Year.HasValue)
     {
         item.File.Tag.Year = item.Year.Value;
     }
     if (!string.IsNullOrWhiteSpace(item.Genre))
     {
         item.File.Tag.Genres = new string[1] {
             item.Genre
         };
     }
     item.File.Save();
 }