Zeugma440 / atldotnet

Fully managed, portable and easy-to-use C# library to read and edit audio data and metadata (tags) from various audio formats, playlists and CUE sheets
MIT License
440 stars 60 forks source link

ATL sets ID3 tags instead of VorbisComment on FLAC files #229

Closed GOATS2K closed 9 months ago

GOATS2K commented 9 months ago

The problem

When writing tags to FLAC files, ATL seems to be writing ID3 v2 tags instead of VorbisComment tags. This is evident from opening the file in a hex editor and seeing the ID3 header.

Environment

Code To Reproduce Issue

private void Tag(ATL.Track track, Models.Track trackMetadata)
{
    // remove all existing tags
    track.Remove(ATL.AudioData.MetaDataIOFactory.TagType.ANY);

    track.Artist = ArtistUtils.CalculateArtistString(trackMetadata.Artists);
    track.AlbumArtist = ArtistUtils.CalculateArtistString(_album.Artists);
    track.Title = trackMetadata.TitleWithFeaturingArtist;
    track.Album = _album.Title;

    track.Year = _album.ReleaseDate.Year;
    track.Date = _album.ReleaseDate;

    track.TrackNumber = trackMetadata.TrackNumber;

    track.Genre = trackMetadata.Genre;

    if (_album.CatalogNumber is not null)
    {
        track.AdditionalFields.Add("CATALOGNUMBER", _album.CatalogNumber);
    }

    track.Save();
}
Zeugma440 commented 9 months ago

Hi there,

Thanks for your feedback.

There are two ways to fix what you describe :

Cheers~

GOATS2K commented 9 months ago

Thank you for getting back to me so quickly.

I'll try that and see how it goes! :)

Edit: That worked!