namespace Harmonia.Core.Tags;

public class SongTagInfo
{
    public string? Title { get; set; }
    public string? Album { get; set; }
    public List<string> Artists { get; set; } = [];
    public List<string> AlbumArtists { get; set; } = [];
    public byte? DiscNumber { get; set; }
    public byte? TrackNumber { get; set; }
    public TimeSpan Length { get; set; } = TimeSpan.Zero;
    public ushort? Year { get; set; }
    public string? Genre { get; set; }
    public uint BitRate { get; set; }
    public uint SampleRate { get; set; }
    public List<PictureTag> Pictures { get; set; } = [];
    public Dictionary<string, string> Other { get; set; } = [];

    public PictureTag? FrontCover => Pictures.Where(x => x.PictureType != PictureType.NotAPicture)
            .OrderBy(x => x.PictureType == PictureType.FrontCover)
            .FirstOrDefault();
}