Refactors the book, artist, and album slices across the stack

This commit is contained in:
BinaryAlley committed 2026-09-17 13:30:48 -07:00
1 parent 8aaf9fe64e
commit ea6eb9f796
439 files changed
+28235 -3156

No files matched your search

@@ -0,0 +1,19 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Albums;
/// <summary>
/// Represents a lightweight album response, containing only the fields needed by the client for card-style navigation.
/// </summary>
/// <param name="Id">The Id of the album.</param>
/// <param name="Title">The title of the album.</param>
/// <param name="TotalTracks">The number of tracks of the release.</param>
[DebuggerDisplay("Title: {Title}")]
public record AlbumLiteResponse(
Guid Id,
string Title,
int TotalTracks
);
@@ -0,0 +1,49 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Contracts.DTO.MediaContributors;
using Lumina.Contracts.DTO.MediaLibrary.AudioLibrary;
using Lumina.Contracts.DTO.MediaLibrary.AudioLibrary.MusicLibrary;
using Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Tracks;
using Lumina.Domain.SharedKernel.Common.Enums.AudioLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Albums;
/// <summary>
/// Represents an album response.
/// </summary>
/// <param name="Id">The Id of the album.</param>
/// <param name="ArtistId">The Id of the artist the album belongs to.</param>
/// <param name="LibraryId">The Id of the media library this album belongs to.</param>
/// <param name="Metadata">The album metadata of the album.</param>
/// <param name="MediaFormat">The physical or digital medium of the album, if applicable.</param>
/// <param name="Barcode">The barcode of the album, if applicable.</param>
/// <param name="CatalogNumber">The catalog number of the album, if applicable.</param>
/// <param name="MusicBrainzReleaseId">The MusicBrainz identifier of the release, if applicable.</param>
/// <param name="MusicBrainzReleaseGroupId">The MusicBrainz identifier of the release group, if applicable.</param>
/// <param name="MusicBrainzReleaseArtistId">The MusicBrainz identifier of the release artist, if applicable.</param>
/// <param name="CreatedOnUtc">The date and time when the album was created.</param>
/// <param name="UpdatedOnUtc">The optional date and time when the album was updated.</param>
/// <param name="Contributors">The list of references to the media contributors that performed on the album, each with the role they played.</param>
/// <param name="Ratings">The list of ratings for this album.</param>
/// <param name="Tracks">The list of tracks of the album.</param>
[DebuggerDisplay("Title: {Metadata.Title}")]
public record AlbumResponse(
Guid Id,
Guid ArtistId,
Guid LibraryId,
AlbumMetadataDto Metadata,
MusicMediaFormat? MediaFormat,
string? Barcode,
string? CatalogNumber,
Guid? MusicBrainzReleaseId,
Guid? MusicBrainzReleaseGroupId,
Guid? MusicBrainzReleaseArtistId,
DateTime CreatedOnUtc,
DateTime? UpdatedOnUtc,
List<MediaContributorReferenceDto>? Contributors,
List<AudioRatingDto>? Ratings,
List<TrackResponse>? Tracks
);
@@ -0,0 +1,17 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Artists;
/// <summary>
/// Represents a lightweight artist response, containing only the fields needed by the client for card-style navigation.
/// </summary>
/// <param name="Id">The Id of the artist.</param>
/// <param name="Name">The name of the artist.</param>
[DebuggerDisplay("Name: {Name}")]
public record ArtistLiteResponse(
Guid Id,
string Name
);
@@ -0,0 +1,34 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Contracts.DTO.MediaContributors;
using Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Albums;
using System;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Artists;
/// <summary>
/// Represents an artist response.
/// </summary>
/// <param name="Id">The Id of the artist.</param>
/// <param name="LibraryId">The Id of the media library this artist belongs to.</param>
/// <param name="Name">The name of the artist.</param>
/// <param name="Website">The website of the artist, if applicable.</param>
/// <param name="MusicBrainzArtistId">The MusicBrainz identifier of the artist, if applicable.</param>
/// <param name="Contributors">The list of references to the media contributors that make up the artist, each with the role they played.</param>
/// <param name="Albums">The list of albums of the artist, each with its own list of tracks.</param>
/// <param name="CreatedOnUtc">The date and time when the artist was created.</param>
/// <param name="UpdatedOnUtc">The optional date and time when the artist was updated.</param>
[DebuggerDisplay("Name: {Name}")]
public record ArtistResponse(
Guid Id,
Guid LibraryId,
string Name,
string? Website,
Guid? MusicBrainzArtistId,
List<MediaContributorReferenceDto>? Contributors,
List<AlbumResponse>? Albums,
DateTime CreatedOnUtc,
DateTime? UpdatedOnUtc
);
@@ -0,0 +1,21 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Tracks;
/// <summary>
/// Represents a lightweight track response, containing only the fields needed by the client to display the tracks of an album.
/// </summary>
/// <param name="Id">The Id of the track.</param>
/// <param name="Title">The title of the track.</param>
/// <param name="TrackNumber">The number of the track on its disc.</param>
/// <param name="DiscNumber">The number of the disc the track belongs to, if applicable.</param>
[DebuggerDisplay("Title: {Title}")]
public record TrackLiteResponse(
Guid Id,
string Title,
int TrackNumber,
int? DiscNumber
);
@@ -0,0 +1,59 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Contracts.DTO.Common;
using Lumina.Contracts.DTO.MediaContributors;
using Lumina.Contracts.DTO.MediaLibrary.AudioLibrary;
using Lumina.Contracts.DTO.MediaLibrary.AudioLibrary.MusicLibrary;
using Lumina.Domain.SharedKernel.Common.Enums.AudioLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Tracks;
/// <summary>
/// Represents a track response.
/// </summary>
/// <param name="Id">The Id of the track.</param>
/// <param name="AlbumId">The Id of the album the track belongs to.</param>
/// <param name="LibraryId">The Id of the media library this track belongs to.</param>
/// <param name="Path">The file system path of the track.</param>
/// <param name="Metadata">The audio metadata of the track.</param>
/// <param name="TrackNumber">The number of the track on its disc.</param>
/// <param name="DiscNumber">The number of the disc the track belongs to, if applicable.</param>
/// <param name="Script">The script used by the language of the track, if applicable.</param>
/// <param name="Key">The musical key of the track, if applicable.</param>
/// <param name="Bpm">The tempo of the track in beats per minute, if applicable.</param>
/// <param name="Work">The title of the work the track is a recording of, if applicable.</param>
/// <param name="MusicBrainzRecordingId">The MusicBrainz identifier of the recording, if applicable.</param>
/// <param name="MusicBrainzTrackId">The MusicBrainz identifier of the track, if applicable.</param>
/// <param name="MusicBrainzWorkId">The MusicBrainz identifier of the work, if applicable.</param>
/// <param name="CreatedOnUtc">The date and time when the track was created.</param>
/// <param name="UpdatedOnUtc">The optional date and time when the track was updated.</param>
/// <param name="Contributors">The list of references to the media contributors that performed on the track, each with the role they played.</param>
/// <param name="Ratings">The list of ratings for this track.</param>
/// <param name="Moods">The list of moods of the track.</param>
/// <param name="Isrcs">The list of ISRC (International Standard Recording Code) of the track.</param>
[DebuggerDisplay("Title: {Metadata.Title}")]
public record TrackResponse(
Guid Id,
Guid AlbumId,
Guid LibraryId,
string Path,
AudioMetadataDto Metadata,
int TrackNumber,
int? DiscNumber,
string? Script,
MusicKey? Key,
int? Bpm,
string? Work,
Guid? MusicBrainzRecordingId,
Guid? MusicBrainzTrackId,
Guid? MusicBrainzWorkId,
DateTime CreatedOnUtc,
DateTime? UpdatedOnUtc,
List<MediaContributorReferenceDto>? Contributors,
List<AudioRatingDto>? Ratings,
List<MoodDto>? Moods,
List<IsrcDto>? Isrcs
);
@@ -0,0 +1,14 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.MediaLibrary.WrittenContentLibrary.BookLibrary.Books;
/// <summary>
/// Represents the response of an update book cover operation.
/// </summary>
/// <param name="CoverPath">The relative path of the stored cover image.</param>
[DebuggerDisplay("CoverPath: {CoverPath}")]
public record UpdateBookCoverResponse(
string CoverPath
);