mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 11:11:10 +00:00
Refactors the book, artist, and album slices across the stack
This commit is contained in:
1 parent
8aaf9fe64e
commit
ea6eb9f796
439 files changed
+28235
-3156
No files matched your search
@@ -0,0 +1,22 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.DTO.Common;
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.AudioLibrary;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.DTO.MediaLibrary.AudioLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Data transfer object for the rating of an audio media element.
|
||||
/// </summary>
|
||||
/// <param name="Value">The rating value of the audio media element.</param>
|
||||
/// <param name="MaxValue">The maximum possible rating value of the audio media element.</param>
|
||||
/// <param name="Source">The source of the audio rating (e.g., a specific website or platform).</param>
|
||||
/// <param name="VoteCount">The number of votes that contributed to the audio rating.</param>
|
||||
[DebuggerDisplay("{Value}/{MaxValue}")]
|
||||
public record AudioRatingDto(
|
||||
decimal? Value,
|
||||
decimal? MaxValue,
|
||||
AudioRatingSource? Source,
|
||||
int? VoteCount
|
||||
) : RatingDto(Value, MaxValue, VoteCount);
|
||||
@@ -0,0 +1,40 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.DTO.Common;
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.AudioLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.DTO.MediaLibrary.AudioLibrary.MusicLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Data transfer object for the metadata of an album.
|
||||
/// </summary>
|
||||
/// <param name="Title">The title of the album. Required.</param>
|
||||
/// <param name="OriginalTitle">The original title of the album, if different from the current title. Optional.</param>
|
||||
/// <param name="Description">A brief description or summary of the album. Optional.</param>
|
||||
/// <param name="ReleaseInfo">The release information, including release date and other relevant details. Required.</param>
|
||||
/// <param name="Language">The language of the album. Optional.</param>
|
||||
/// <param name="OriginalLanguage">The original language of the album, if it has been translated. Optional.</param>
|
||||
/// <param name="Tags">The list of tags that further describe or categorize the album. Required.</param>
|
||||
/// <param name="Genres">The list of genres associated with the album. Required.</param>
|
||||
/// <param name="ReleaseType">The type of the release. Optional.</param>
|
||||
/// <param name="ReleaseStatus">The status of the release. Optional.</param>
|
||||
/// <param name="TotalDiscs">The number of discs of the release. Optional.</param>
|
||||
/// <param name="TotalTracks">The number of tracks of the release. Required.</param>
|
||||
[DebuggerDisplay("Title: {Title}")]
|
||||
public record AlbumMetadataDto(
|
||||
string? Title,
|
||||
string? OriginalTitle,
|
||||
string? Description,
|
||||
ReleaseInfoDto? ReleaseInfo,
|
||||
LanguageInfoDto? Language,
|
||||
LanguageInfoDto? OriginalLanguage,
|
||||
List<TagDto>? Tags,
|
||||
List<GenreDto>? Genres,
|
||||
MusicReleaseType? ReleaseType,
|
||||
MusicReleaseStatus? ReleaseStatus,
|
||||
int? TotalDiscs,
|
||||
int? TotalTracks
|
||||
);
|
||||
@@ -0,0 +1,43 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.DTO.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.DTO.MediaLibrary.AudioLibrary.MusicLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Data transfer object for the audio metadata of a track.
|
||||
/// </summary>
|
||||
/// <param name="Title">The title of the track. Required.</param>
|
||||
/// <param name="OriginalTitle">The original title of the track, if different from the current title. Optional.</param>
|
||||
/// <param name="Description">A brief description or summary of the track. Optional.</param>
|
||||
/// <param name="ReleaseInfo">The release information, including release date and other relevant details. Required.</param>
|
||||
/// <param name="Language">The language of the track. Optional.</param>
|
||||
/// <param name="OriginalLanguage">The original language of the track, if it has been translated. Optional.</param>
|
||||
/// <param name="Tags">The list of tags that further describe or categorize the track. Required.</param>
|
||||
/// <param name="Genres">The list of genres associated with the track. Required.</param>
|
||||
/// <param name="DurationInSeconds">The duration of the audio of the track in seconds. Required.</param>
|
||||
/// <param name="SampleRate">The sample rate of the audio of the track in Hz. Required.</param>
|
||||
/// <param name="Channels">The number of audio channels of the track. Required.</param>
|
||||
/// <param name="BitDepth">The bit depth of the audio of the track. Optional.</param>
|
||||
/// <param name="AudioCodec">The audio codec used by the track. Optional.</param>
|
||||
/// <param name="Bitrate">The bitrate of the audio of the track in kbps. Optional.</param>
|
||||
[DebuggerDisplay("Title: {Title}")]
|
||||
public record AudioMetadataDto(
|
||||
string? Title,
|
||||
string? OriginalTitle,
|
||||
string? Description,
|
||||
ReleaseInfoDto? ReleaseInfo,
|
||||
LanguageInfoDto? Language,
|
||||
LanguageInfoDto? OriginalLanguage,
|
||||
List<TagDto>? Tags,
|
||||
List<GenreDto>? Genres,
|
||||
int? DurationInSeconds,
|
||||
int? SampleRate,
|
||||
int? Channels,
|
||||
int? BitDepth,
|
||||
string? AudioCodec,
|
||||
int? Bitrate
|
||||
);
|
||||
@@ -0,0 +1,14 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.DTO.MediaLibrary.AudioLibrary.MusicLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Data transfer object for an ISRC (International Standard Recording Code) of a track.
|
||||
/// </summary>
|
||||
/// <param name="Value">The value of the ISRC.</param>
|
||||
[DebuggerDisplay("Value: {Value}")]
|
||||
public record IsrcDto(
|
||||
string? Value
|
||||
);
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
#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.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Tracks;
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.AudioLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Albums;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to add an album to an artist, together with the tracks of the album.
|
||||
/// </summary>
|
||||
/// <param name="Metadata">The album metadata of the album. Required.</param>
|
||||
/// <param name="MediaFormat">The physical or digital medium of the album. Optional.</param>
|
||||
/// <param name="Barcode">The barcode of the album. Optional.</param>
|
||||
/// <param name="CatalogNumber">The catalog number of the album. Optional.</param>
|
||||
/// <param name="MusicBrainzReleaseId">The MusicBrainz identifier of the release. Optional.</param>
|
||||
/// <param name="MusicBrainzReleaseGroupId">The MusicBrainz identifier of the release group. Optional.</param>
|
||||
/// <param name="MusicBrainzReleaseArtistId">The MusicBrainz identifier of the release artist. Optional.</param>
|
||||
/// <param name="Contributors">The list of media contributors that performed on the album. Required.</param>
|
||||
/// <param name="Ratings">The list of ratings for this album. Required.</param>
|
||||
/// <param name="Tracks">The list of tracks of the album. Required.</param>
|
||||
[DebuggerDisplay("Title: {Metadata.Title}")]
|
||||
public record AddAlbumRequest(
|
||||
AlbumMetadataDto? Metadata,
|
||||
MusicMediaFormat? MediaFormat,
|
||||
string? Barcode,
|
||||
string? CatalogNumber,
|
||||
Guid? MusicBrainzReleaseId,
|
||||
Guid? MusicBrainzReleaseGroupId,
|
||||
Guid? MusicBrainzReleaseArtistId,
|
||||
List<MediaContributorReferenceDto>? Contributors,
|
||||
List<AudioRatingDto>? Ratings,
|
||||
List<AddTrackRequest>? Tracks
|
||||
);
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Albums;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to delete an album by the specified Id.
|
||||
/// </summary>
|
||||
/// <param name="ArtistId">The unique identifier of the artist the album belongs to, taken from the route.</param>
|
||||
/// <param name="AlbumId">The unique identifier of the album to delete.</param>
|
||||
[DebuggerDisplay("AlbumId: {AlbumId}")]
|
||||
public record DeleteAlbumRequest(
|
||||
Guid ArtistId,
|
||||
Guid AlbumId
|
||||
);
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Albums;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get an album by the specified Id.
|
||||
/// </summary>
|
||||
/// <param name="ArtistId">The unique identifier of the artist the album belongs to, taken from the route.</param>
|
||||
/// <param name="AlbumId">The unique identifier of the album to retrieve.</param>
|
||||
[DebuggerDisplay("AlbumId: {AlbumId}")]
|
||||
public record GetAlbumRequest(
|
||||
Guid ArtistId,
|
||||
Guid AlbumId
|
||||
);
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Albums;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get the lightweight read models of the tracks of an album.
|
||||
/// </summary>
|
||||
/// <param name="ArtistId">The unique identifier of the artist the album belongs to, taken from the route.</param>
|
||||
/// <param name="AlbumId">The unique identifier of the album whose tracks are retrieved.</param>
|
||||
/// <param name="CurrentPage">The page of results to retrieve. Optional.</param>
|
||||
/// <param name="PerPage">The maximum number of tracks to retrieve per page. Optional.</param>
|
||||
[DebuggerDisplay("AlbumId: {AlbumId}")]
|
||||
public record GetAlbumTracksLiteRequest(
|
||||
Guid ArtistId,
|
||||
Guid AlbumId,
|
||||
int? CurrentPage,
|
||||
int? PerPage
|
||||
);
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Albums;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get the tracks of an album.
|
||||
/// </summary>
|
||||
/// <param name="ArtistId">The unique identifier of the artist the album belongs to, taken from the route.</param>
|
||||
/// <param name="AlbumId">The unique identifier of the album whose tracks are retrieved.</param>
|
||||
[DebuggerDisplay("AlbumId: {AlbumId}")]
|
||||
public record GetAlbumTracksRequest(
|
||||
Guid ArtistId,
|
||||
Guid AlbumId
|
||||
);
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
#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.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Albums;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to update an existing album.
|
||||
/// </summary>
|
||||
/// <param name="Metadata">The album metadata of the album. Required.</param>
|
||||
/// <param name="MediaFormat">The physical or digital medium of the album. Optional.</param>
|
||||
/// <param name="Barcode">The barcode of the album. Optional.</param>
|
||||
/// <param name="CatalogNumber">The catalog number of the album. Optional.</param>
|
||||
/// <param name="MusicBrainzReleaseId">The MusicBrainz identifier of the release. Optional.</param>
|
||||
/// <param name="MusicBrainzReleaseGroupId">The MusicBrainz identifier of the release group. Optional.</param>
|
||||
/// <param name="MusicBrainzReleaseArtistId">The MusicBrainz identifier of the release artist. Optional.</param>
|
||||
/// <param name="Contributors">The list of media contributors that performed on the album. Optional.</param>
|
||||
/// <param name="Ratings">The list of ratings for this album. Required.</param>
|
||||
[DebuggerDisplay("Title: {Metadata.Title}")]
|
||||
public record UpdateAlbumRequest(
|
||||
AlbumMetadataDto? Metadata,
|
||||
MusicMediaFormat? MediaFormat,
|
||||
string? Barcode,
|
||||
string? CatalogNumber,
|
||||
Guid? MusicBrainzReleaseId,
|
||||
Guid? MusicBrainzReleaseGroupId,
|
||||
Guid? MusicBrainzReleaseArtistId,
|
||||
List<MediaContributorReferenceDto>? Contributors,
|
||||
List<AudioRatingDto>? Ratings
|
||||
);
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.DTO.MediaContributors;
|
||||
using Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Albums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Artists;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to add an artist, together with the albums of the artist and the tracks of those albums.
|
||||
/// </summary>
|
||||
/// <param name="Name">The name of the artist. Required.</param>
|
||||
/// <param name="Website">The website of the artist. Optional.</param>
|
||||
/// <param name="MusicBrainzArtistId">The MusicBrainz identifier of the artist. Optional.</param>
|
||||
/// <param name="Contributors">The list of media contributors that make up the artist. Required.</param>
|
||||
/// <param name="Albums">The list of albums of the artist, each with its own list of tracks. Required.</param>
|
||||
[DebuggerDisplay("Name: {Name}")]
|
||||
public record AddArtistRequest(
|
||||
string? Name,
|
||||
string? Website,
|
||||
Guid? MusicBrainzArtistId,
|
||||
List<MediaContributorReferenceDto>? Contributors,
|
||||
List<AddAlbumRequest>? Albums
|
||||
);
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Artists;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get the lightweight read models of the albums of an artist.
|
||||
/// </summary>
|
||||
/// <param name="ArtistId">The unique identifier of the artist whose albums are retrieved.</param>
|
||||
/// <param name="CurrentPage">The page of results to retrieve. Optional.</param>
|
||||
/// <param name="PerPage">The maximum number of albums to retrieve per page. Optional.</param>
|
||||
[DebuggerDisplay("ArtistId: {ArtistId}")]
|
||||
public record GetArtistAlbumsLiteRequest(
|
||||
Guid ArtistId,
|
||||
int? CurrentPage,
|
||||
int? PerPage
|
||||
);
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Artists;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get the albums of an artist.
|
||||
/// </summary>
|
||||
/// <param name="ArtistId">The unique identifier of the artist whose albums are retrieved.</param>
|
||||
[DebuggerDisplay("ArtistId: {ArtistId}")]
|
||||
public record GetArtistAlbumsRequest(
|
||||
Guid ArtistId
|
||||
);
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Artists;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get an artist by the specified Id.
|
||||
/// </summary>
|
||||
/// <param name="ArtistId">The unique identifier of the artist to retrieve.</param>
|
||||
[DebuggerDisplay("ArtistId: {ArtistId}")]
|
||||
public record GetArtistRequest(
|
||||
Guid ArtistId
|
||||
);
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Artists;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get the lightweight read models of the artists of a media library.
|
||||
/// </summary>
|
||||
/// <param name="LibraryId">The Id of the media library whose artists are retrieved. Required.</param>
|
||||
/// <param name="CurrentPage">The page of results to retrieve. Optional.</param>
|
||||
/// <param name="PerPage">The maximum number of artists to retrieve per page. Optional.</param>
|
||||
/// <param name="SearchTerm">The search term used to filter the artists by name. Optional.</param>
|
||||
[DebuggerDisplay("LibraryId: {LibraryId}")]
|
||||
public record GetArtistsLiteRequest(
|
||||
Guid LibraryId,
|
||||
int? CurrentPage,
|
||||
int? PerPage,
|
||||
string? SearchTerm
|
||||
);
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Artists;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get the artists of a media library.
|
||||
/// </summary>
|
||||
/// <param name="LibraryId">The Id of the media library whose artists are retrieved. Required.</param>
|
||||
/// <param name="CurrentPage">The page of results to retrieve. Optional.</param>
|
||||
/// <param name="PerPage">The maximum number of artists to retrieve per page. Optional.</param>
|
||||
/// <param name="SearchTerm">The search term used to filter the artists by name. Optional.</param>
|
||||
[DebuggerDisplay("LibraryId: {LibraryId}")]
|
||||
public record GetArtistsRequest(
|
||||
Guid LibraryId,
|
||||
int? CurrentPage,
|
||||
int? PerPage,
|
||||
string? SearchTerm
|
||||
);
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.DTO.MediaContributors;
|
||||
using Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Albums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Artists;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to update an existing artist.
|
||||
/// </summary>
|
||||
/// <param name="Name">The name of the artist. Required.</param>
|
||||
/// <param name="Website">The website of the artist. Optional.</param>
|
||||
/// <param name="MusicBrainzArtistId">The MusicBrainz identifier of the artist. Optional.</param>
|
||||
/// <param name="Contributors">The list of media contributors that make up the artist. Required.</param>
|
||||
/// <param name="Albums">The list of albums of the artist, each with its own list of tracks. Required.</param>
|
||||
[DebuggerDisplay("Name: {Name}")]
|
||||
public record UpdateArtistRequest(
|
||||
string? Name,
|
||||
string? Website,
|
||||
Guid? MusicBrainzArtistId,
|
||||
List<MediaContributorReferenceDto>? Contributors,
|
||||
List<AddAlbumRequest>? Albums
|
||||
);
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
#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.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Tracks;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to add a track to an album.
|
||||
/// </summary>
|
||||
/// <param name="Path">The file system path of the track. Required.</param>
|
||||
/// <param name="Metadata">The audio metadata of the track. Required.</param>
|
||||
/// <param name="TrackNumber">The number of the track on its disc. Required.</param>
|
||||
/// <param name="DiscNumber">The number of the disc the track belongs to. Optional.</param>
|
||||
/// <param name="Script">The script used by the language of the track. Optional.</param>
|
||||
/// <param name="Key">The musical key of the track. Optional.</param>
|
||||
/// <param name="Bpm">The tempo of the track in beats per minute. Optional.</param>
|
||||
/// <param name="Work">The title of the work the track is a recording of. Optional.</param>
|
||||
/// <param name="MusicBrainzRecordingId">The MusicBrainz identifier of the recording. Optional.</param>
|
||||
/// <param name="MusicBrainzTrackId">The MusicBrainz identifier of the track. Optional.</param>
|
||||
/// <param name="MusicBrainzWorkId">The MusicBrainz identifier of the work. Optional.</param>
|
||||
/// <param name="Moods">The list of moods of the track. Optional.</param>
|
||||
/// <param name="Isrcs">The list of ISRC (International Standard Recording Code) of the track. Optional.</param>
|
||||
/// <param name="Contributors">The list of media contributors that performed on the track. Required.</param>
|
||||
/// <param name="Ratings">The list of ratings for this track. Required.</param>
|
||||
[DebuggerDisplay("Title: {Metadata.Title}")]
|
||||
public record AddTrackRequest(
|
||||
string? Path,
|
||||
AudioMetadataDto? Metadata,
|
||||
int? TrackNumber,
|
||||
int? DiscNumber,
|
||||
string? Script,
|
||||
MusicKey? Key,
|
||||
int? Bpm,
|
||||
string? Work,
|
||||
Guid? MusicBrainzRecordingId,
|
||||
Guid? MusicBrainzTrackId,
|
||||
Guid? MusicBrainzWorkId,
|
||||
List<MoodDto>? Moods,
|
||||
List<IsrcDto>? Isrcs,
|
||||
List<MediaContributorReferenceDto>? Contributors,
|
||||
List<AudioRatingDto>? Ratings
|
||||
);
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Tracks;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to delete a track by the specified Id.
|
||||
/// </summary>
|
||||
/// <param name="ArtistId">The unique identifier of the artist the album of the track belongs to, taken from the route.</param>
|
||||
/// <param name="AlbumId">The unique identifier of the album the track belongs to, taken from the route.</param>
|
||||
/// <param name="TrackId">The unique identifier of the track to delete.</param>
|
||||
[DebuggerDisplay("TrackId: {TrackId}")]
|
||||
public record DeleteTrackRequest(
|
||||
Guid ArtistId,
|
||||
Guid AlbumId,
|
||||
Guid TrackId
|
||||
);
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Tracks;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get a track by the specified Id.
|
||||
/// </summary>
|
||||
/// <param name="ArtistId">The unique identifier of the artist the album of the track belongs to, taken from the route.</param>
|
||||
/// <param name="AlbumId">The unique identifier of the album the track belongs to, taken from the route.</param>
|
||||
/// <param name="TrackId">The unique identifier of the track to retrieve.</param>
|
||||
[DebuggerDisplay("TrackId: {TrackId}")]
|
||||
public record GetTrackRequest(
|
||||
Guid ArtistId,
|
||||
Guid AlbumId,
|
||||
Guid TrackId
|
||||
);
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
#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.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Tracks;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to update an existing track.
|
||||
/// </summary>
|
||||
/// <param name="Path">The file system path of the track. Required.</param>
|
||||
/// <param name="Metadata">The audio metadata of the track. Required.</param>
|
||||
/// <param name="TrackNumber">The number of the track on its disc. Required.</param>
|
||||
/// <param name="DiscNumber">The number of the disc the track belongs to. Optional.</param>
|
||||
/// <param name="Script">The script used by the language of the track. Optional.</param>
|
||||
/// <param name="Key">The musical key of the track. Optional.</param>
|
||||
/// <param name="Bpm">The tempo of the track in beats per minute. Optional.</param>
|
||||
/// <param name="Work">The title of the work the track is a recording of. Optional.</param>
|
||||
/// <param name="MusicBrainzRecordingId">The MusicBrainz identifier of the recording. Optional.</param>
|
||||
/// <param name="MusicBrainzTrackId">The MusicBrainz identifier of the track. Optional.</param>
|
||||
/// <param name="MusicBrainzWorkId">The MusicBrainz identifier of the work. Optional.</param>
|
||||
/// <param name="Contributors">The list of media contributors that performed on the track. Optional.</param>
|
||||
/// <param name="Ratings">The list of ratings for this track. Required.</param>
|
||||
/// <param name="Moods">The list of moods of the track. Optional.</param>
|
||||
/// <param name="Isrcs">The list of ISRC (International Standard Recording Code) of the track. Optional.</param>
|
||||
[DebuggerDisplay("Title: {Metadata.Title}")]
|
||||
public record UpdateTrackRequest(
|
||||
string? Path,
|
||||
AudioMetadataDto? Metadata,
|
||||
int? TrackNumber,
|
||||
int? DiscNumber,
|
||||
string? Script,
|
||||
MusicKey? Key,
|
||||
int? Bpm,
|
||||
string? Work,
|
||||
Guid? MusicBrainzRecordingId,
|
||||
Guid? MusicBrainzTrackId,
|
||||
Guid? MusicBrainzWorkId,
|
||||
List<MediaContributorReferenceDto>? Contributors,
|
||||
List<AudioRatingDto>? Ratings,
|
||||
List<MoodDto>? Moods,
|
||||
List<IsrcDto>? Isrcs
|
||||
);
|
||||
+1
-1
@@ -33,7 +33,7 @@ namespace Lumina.Contracts.Requests.MediaLibrary.WrittenContentLibrary.BookLibra
|
||||
/// <param name="Ratings">The list of ratings for this book. Required.</param>
|
||||
[DebuggerDisplay("Title: {Metadata.Title}")]
|
||||
public record AddBookRequest(
|
||||
string Path,
|
||||
string? Path,
|
||||
WrittenContentMetadataDto? Metadata,
|
||||
BookFormat? Format,
|
||||
string? Edition,
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.WrittenContentLibrary.BookLibrary.Books.Reading;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to check the reading availability of a book.
|
||||
/// </summary>
|
||||
/// <param name="BookId">The Id of the book whose reading availability is checked. Required.</param>
|
||||
[DebuggerDisplay("BookId: {BookId}")]
|
||||
public sealed record GetReadingAvailabilityRequest(
|
||||
Guid BookId
|
||||
);
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.WrittenContentLibrary.BookLibrary.Books.Reading;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get the reading manifest of a book.
|
||||
/// </summary>
|
||||
/// <param name="BookId">The Id of the book whose reading manifest is retrieved. Required.</param>
|
||||
[DebuggerDisplay("BookId: {BookId}")]
|
||||
public sealed record GetReadingManifestRequest(
|
||||
Guid BookId
|
||||
);
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.WrittenContentLibrary.BookLibrary.Books.Reading;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get a resource of a book, for reading.
|
||||
/// </summary>
|
||||
/// <param name="BookId">The Id of the book whose resource is retrieved. Required.</param>
|
||||
/// <param name="ResourceKey">The opaque resource key of the resource. Required.</param>
|
||||
[DebuggerDisplay("BookId: {BookId}, ResourceKey: {ResourceKey}")]
|
||||
public sealed record GetReadingResourceRequest(
|
||||
Guid BookId,
|
||||
string ResourceKey
|
||||
);
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.MediaLibrary.WrittenContentLibrary.BookLibrary.Books.Reading;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get the content of a reading section of a book.
|
||||
/// </summary>
|
||||
/// <param name="BookId">The Id of the book whose reading section is retrieved. Required.</param>
|
||||
/// <param name="LocationRef">The opaque location reference of the reading section. Required.</param>
|
||||
[DebuggerDisplay("BookId: {BookId}, LocationRef: {LocationRef}")]
|
||||
public sealed record GetReadingSectionRequest(
|
||||
Guid BookId,
|
||||
string LocationRef
|
||||
);
|
||||
+19
@@ -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
|
||||
);
|
||||
+49
@@ -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
|
||||
);
|
||||
+17
@@ -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
|
||||
);
|
||||
+34
@@ -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
|
||||
);
|
||||
+21
@@ -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
|
||||
);
|
||||
+59
@@ -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
|
||||
);
|
||||
+14
@@ -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
|
||||
);
|
||||
Reference in new issue
Block a user