mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 18:21:10 +00:00
Extends the music library listings with covers, sorting and alpha filtering.
This commit is contained in:
1 parent
0019821e87
commit
9d82f283e4
69 files changed
+3613
-268
No files matched your search
@@ -0,0 +1,19 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.MediaLibrary;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.DTO.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Data transfer object for a stored piece of artwork of a media item.
|
||||
/// </summary>
|
||||
/// <param name="Type">The type of the artwork, like the cover or the back of the media item.</param>
|
||||
/// <param name="Ordinal">The ordinal of the artwork within its type, so that multiple artworks of the same type can be ordered.</param>
|
||||
/// <param name="Path">The relative path of the stored artwork file.</param>
|
||||
[DebuggerDisplay("Type: {Type}, Ordinal: {Ordinal}, Path: {Path}")]
|
||||
public sealed record MediaArtworkDto(
|
||||
ArtworkType Type,
|
||||
int Ordinal,
|
||||
string Path
|
||||
);
|
||||
+14
-1
@@ -1,4 +1,5 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.Common;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
@@ -10,9 +11,21 @@ namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Artis
|
||||
/// <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>
|
||||
/// <param name="FilterAlphaKey">
|
||||
/// The alpha key used to filter the results by the first character of their name, for the alpha picker. Optional.
|
||||
/// Can be <see langword="null"/> to disable alpha filtering, a single ASCII letter (case-insensitive) to filter by that letter,
|
||||
/// "#" to filter by names whose first character is a digit, or "*" to filter by names whose first character is neither a letter nor a digit.
|
||||
/// </param>
|
||||
/// <param name="ShouldIgnoreThePrefixForAlphaPicker">Whether the leading "The " prefix of a name should be ignored when computing the alpha key, or not. Optional.</param>
|
||||
/// <param name="SortBy">The name of the field by which to sort the results. Optional.</param>
|
||||
/// <param name="SortOrder">The direction in which to sort the results. Optional.</param>
|
||||
[DebuggerDisplay("SearchTerm: {SearchTerm}")]
|
||||
public record GetArtistsLiteRequest(
|
||||
int? CurrentPage,
|
||||
int? PerPage,
|
||||
string? SearchTerm
|
||||
string? SearchTerm,
|
||||
string? FilterAlphaKey,
|
||||
bool ShouldIgnoreThePrefixForAlphaPicker,
|
||||
string? SortBy,
|
||||
SortOrder? SortOrder
|
||||
);
|
||||
+9
-1
@@ -1,5 +1,7 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.AudioLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
@@ -11,9 +13,15 @@ namespace Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Albu
|
||||
/// <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>
|
||||
/// <param name="CoverPath">The path of the image representing the album, if available.</param>
|
||||
/// <param name="ReleaseYear">The release year of the album (the re-release year, if available, or the original release year), if known.</param>
|
||||
/// <param name="ReleaseTypes">The set of types of the release.</param>
|
||||
[DebuggerDisplay("Title: {Title}")]
|
||||
public record AlbumLiteResponse(
|
||||
Guid Id,
|
||||
string Title,
|
||||
int TotalTracks
|
||||
int TotalTracks,
|
||||
string? CoverPath,
|
||||
int? ReleaseYear,
|
||||
List<MusicReleaseType>? ReleaseTypes
|
||||
);
|
||||
+6
-1
@@ -1,4 +1,5 @@
|
||||
#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;
|
||||
@@ -32,6 +33,8 @@ namespace Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Albu
|
||||
/// <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>
|
||||
/// <param name="CoverPath">The path of the image representing the album, if available.</param>
|
||||
/// <param name="Artwork">The stored artwork of the album, in display order, so that all of its pieces can be presented, not just the cover.</param>
|
||||
[DebuggerDisplay("Title: {Metadata.Title}")]
|
||||
public record AlbumResponse(
|
||||
Guid Id,
|
||||
@@ -51,5 +54,7 @@ public record AlbumResponse(
|
||||
DateTime? UpdatedOnUtc,
|
||||
List<MediaContributorReferenceDto>? Contributors,
|
||||
List<AudioRatingDto>? Ratings,
|
||||
List<TrackResponse>? Tracks
|
||||
List<TrackResponse>? Tracks,
|
||||
string? CoverPath,
|
||||
IReadOnlyList<MediaArtworkDto> Artwork
|
||||
);
|
||||
+3
-1
@@ -10,8 +10,10 @@ namespace Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Arti
|
||||
/// </summary>
|
||||
/// <param name="Id">The Id of the artist.</param>
|
||||
/// <param name="Name">The name of the artist.</param>
|
||||
/// <param name="CoverPath">The path of the image representing the artist, if available.</param>
|
||||
[DebuggerDisplay("Name: {Name}")]
|
||||
public record ArtistLiteResponse(
|
||||
Guid Id,
|
||||
string Name
|
||||
string Name,
|
||||
string? CoverPath
|
||||
);
|
||||
+3
-1
@@ -25,6 +25,7 @@ namespace Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Arti
|
||||
/// <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="Ratings">The list of ratings for this artist.</param>
|
||||
/// <param name="Albums">The list of albums of the artist, each with its own list of tracks.</param>
|
||||
/// <param name="CoverPath">The path of the image representing the artist, if available.</param>
|
||||
[DebuggerDisplay("Name: {Metadata.Name}")]
|
||||
public record ArtistResponse(
|
||||
Guid Id,
|
||||
@@ -38,5 +39,6 @@ public record ArtistResponse(
|
||||
DateTime? UpdatedOnUtc,
|
||||
List<MediaContributorReferenceDto>? Contributors,
|
||||
List<AudioRatingDto>? Ratings,
|
||||
List<AlbumResponse>? Albums
|
||||
List<AlbumResponse>? Albums,
|
||||
string? CoverPath
|
||||
);
|
||||
+3
-1
@@ -12,10 +12,12 @@ namespace Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Trac
|
||||
/// <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>
|
||||
/// <param name="DurationInSeconds">The duration of the track in seconds.</param>
|
||||
[DebuggerDisplay("Title: {Title}")]
|
||||
public record TrackLiteResponse(
|
||||
Guid Id,
|
||||
string Title,
|
||||
int TrackNumber,
|
||||
int? DiscNumber
|
||||
int? DiscNumber,
|
||||
int DurationInSeconds
|
||||
);
|
||||
Reference in new issue
Block a user