src/BandcampDownloader/Helpers/TagHelper.cs
/// <summary>
/// Returns the file updated with the specified artist based on the specified TagEditAction.
/// </summary>
/// <param name="file">The file to update.</param>
/// <param name="artist">The value used if TagEditAction = Modify.</param>
/// <param name="editAction">The TagEditAction specifying how the tag should be updated.</param>
Returns the file updated with the specified artist based on the specified TagEditAction.
Returns the file updated with the specified artist based on the specified TagEditAction .
public static TagLib.File UpdateArtist(TagLib.File file, string artist, TagEditAction editAction) {
            switch (editAction) {
                case TagEditAction.Empty:
                    file.Tag.Performers = new string[1] { "" };
                    break;
                case TagEditAction.Modify:
                    file.Tag.Performers = new string[1] { artist };
                    break;
                case TagEditAction.DoNotModify:
                    break;
                default:
                    break;
            }
            return file;
        }
public static TagLib . File UpdateArtist ( TagLib . File file , string artist , TagEditAction editAction ) { switch ( editAction ) { case TagEditAction . Empty : file . Tag . Performers = new string [ 1 ] { " " } ; break ; case TagEditAction . Modify : file . Tag . Performers = new string [ 1 ] { artist } ; break ; case TagEditAction . DoNotModify : break ; default : break ; } return file ; }
Returns the file updated with the specified artist based on the specified TagEditAction.
Returns the file updated with the specified artist based on the specified TagEditAction .
file
TagLib.File
The file to update.
The file to update .
artist
string
The value used if TagEditAction = Modify.
The value used if TagEditAction = Modify .
editAction
TagEditAction
The TagEditAction specifying how the tag should be updated.
The TagEditAction specifying how the tag should be updated .