private void SetMP3Metadata(ModelMp3 metadata) { _taglibMp3MetadataEditor.Tag.AlbumArtists = new string[] { metadata.Artist != null ? metadata.Artist : "" }; _taglibMp3MetadataEditor.Tag.Composers = new string[] { metadata.Composer != null ? metadata.Composer : "" }; _taglibMp3MetadataEditor.Tag.Genres = new string[] { metadata.Genre != null ? metadata.Genre : "" }; _taglibMp3MetadataEditor.Tag.Performers = new string[] { metadata.Artist != null ? metadata.Artist : "" }; _taglibMp3MetadataEditor.Tag.Lyrics = metadata.Lyrics; _taglibMp3MetadataEditor.Tag.Pictures = new IPicture[] { metadata.AlbumArt != null?BinaryImageConverter.ConvertToIPicture(metadata.AlbumArt) : new Picture { } }; _taglibMp3MetadataEditor.Tag.Album = metadata.Album; _taglibMp3MetadataEditor.Tag.Comment = metadata.Comments; _taglibMp3MetadataEditor.Tag.Title = metadata.SongTitle; _taglibMp3MetadataEditor.Tag.Track = (uint)metadata.TrackNumber; _taglibMp3MetadataEditor.Tag.Year = (uint)metadata.Year; }
public void SaveMP3(ModelMp3 metadata) { SetMP3Metadata(metadata); _taglibMp3MetadataEditor.Save(); }