#region ========================================================================= USING ===================================================================================== using Lumina.Application.Common.DataAccess.Entities.Common; using Lumina.Domain.SharedKernel.Common.Enums.AudioLibrary; using System; using System.Collections.Generic; using System.Diagnostics; #endregion namespace Lumina.Application.Common.DataAccess.Entities.MediaLibrary.AudioLibrary.MusicLibrary; /// /// Repository entity for the metadata extracted from a discovered music file, staged during a scan, before the artists, albums and tracks are materialized from it. /// [DebuggerDisplay("Path: {Path}")] public class MusicLibraryScanItemMetadataEntity : IStorageEntity { /// /// Gets the Id of the staged music metadata. /// public required Guid Id { get; init; } /// /// Gets the Id of the media library scan that this staged music metadata belongs to. /// public required Guid LibraryScanId { get; init; } /// /// Gets the Id of the media library that this staged music metadata belongs to. /// public required Guid LibraryId { get; init; } /// /// Gets the file system path of the music file whose metadata was extracted. /// public required string Path { get; init; } /// /// Gets the name of the artist, if applicable. /// public string? ArtistName { get; set; } /// /// Gets the type of the release, if applicable. /// public MusicReleaseType? ReleaseType { get; set; } /// /// Gets the release year, if applicable. /// public int? ReleaseYear { get; set; } /// /// Gets the name of the release, if applicable. /// public string? ReleaseName { get; set; } /// /// Gets the title of the track, if applicable. /// public string? TrackTitle { get; set; } /// /// Gets the number of the track on its disc, if applicable. /// public int? TrackNumber { get; set; } /// /// Gets the number of the disc the track belongs to, if applicable. /// public int? DiscNumber { get; set; } /// /// Gets the duration of the audio in seconds. /// public int DurationInSeconds { get; set; } /// /// Gets the sample rate of the audio in Hz. /// public int SampleRate { get; set; } /// /// Gets the number of audio channels. /// public int Channels { get; set; } /// /// Gets the bit depth of the audio, if applicable. /// public int? BitDepth { get; set; } /// /// Gets the audio codec used, if applicable. /// public string? AudioCodec { get; set; } /// /// Gets or sets the container of the audio file, for example MP3, FLAC, OGG, AAC, MP4 or WAV, if applicable. /// public string? Container { get; set; } /// /// Gets or sets the bitrate of the audio in kbps, if applicable. /// public int? Bitrate { get; set; } /// /// Gets or sets the AcoustID fingerprint identifier of the audio file, if applicable. /// public string? AcoustId { get; set; } /// /// Gets or sets the ReplayGain track gain in decibels, if applicable. /// public decimal? ReplayGainTrackGain { get; set; } /// /// Gets or sets the ReplayGain track peak, if applicable. /// public decimal? ReplayGainTrackPeak { get; set; } /// /// Gets or sets the ReplayGain album gain in decibels, if applicable. /// public decimal? ReplayGainAlbumGain { get; set; } /// /// Gets or sets the ReplayGain album peak, if applicable. /// public decimal? ReplayGainAlbumPeak { get; set; } /// /// Gets or sets the moods of the track, read from the tags of the file. /// public List Moods { get; set; } = []; /// /// Gets the MusicBrainz identifier of the artist, read from the tags of the file, if applicable. /// public Guid? MusicBrainzArtistId { get; set; } /// /// Gets the MusicBrainz identifier of the release artist, read from the tags of the file, if applicable. /// public Guid? MusicBrainzReleaseArtistId { get; set; } /// /// Gets the MusicBrainz identifier of the release group, read from the tags of the file, if applicable. /// public Guid? MusicBrainzReleaseGroupId { get; set; } /// /// Gets the MusicBrainz identifier of the release, read from the tags of the file, if applicable. /// public Guid? MusicBrainzReleaseId { get; set; } /// /// Gets the MusicBrainz identifier of the recording, read from the tags of the file, if applicable. /// public Guid? MusicBrainzRecordingId { get; set; } /// /// Gets the MusicBrainz identifier of the track, read from the tags of the file, if applicable. /// public Guid? MusicBrainzTrackId { get; set; } /// /// Gets the MusicBrainz identifier of the work the track is a recording of, read from the tags of the file, if applicable. /// public Guid? MusicBrainzWorkId { get; set; } /// /// Gets the title of the work the track is a recording of, read from the tags of the file, if applicable. /// public string? WorkTitle { get; set; } }