Adds the music library browsing and editing pages to the web client.

This commit is contained in:
BinaryAlley committed 2026-10-13 13:27:28 +03:00
1 parent c7aab63552
commit 5a2c6c2bd8
215 files changed
+60042 -3

No files matched your search

@@ -0,0 +1,21 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Presentation.Web.Common.Requests.Library.AudioLibrary.MusicLibrary.Albums;
/// <summary>
/// Represents a request to get the lightweight details of the albums of a music artist.
/// </summary>
/// <param name="ArtistId">The unique identifier of the artist whose albums are retrieved, taken from the route. Required.</param>
/// <param name="LibraryId">The unique identifier of the media library the artist belongs to. Required.</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(
string ArtistId,
Guid LibraryId,
int? CurrentPage,
int? PerPage
);
@@ -0,0 +1,19 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Presentation.Web.Common.Requests.Library.AudioLibrary.MusicLibrary.Albums;
/// <summary>
/// Represents a request for displaying the details of an album of a music artist.
/// </summary>
/// <param name="ArtistId">The unique identifier of the artist the album belongs to, taken from the route. Required.</param>
/// <param name="AlbumId">The unique identifier of the album whose details are displayed, taken from the route. Required.</param>
/// <param name="LibraryId">The Id of the media library the album belongs to. Required.</param>
[DebuggerDisplay("AlbumId: {AlbumId}")]
public record GetMusicAlbumViewRequest(
string ArtistId,
string AlbumId,
Guid LibraryId
);
@@ -0,0 +1,42 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Presentation.Web.Common.DTO.AudioLibrary;
using Lumina.Presentation.Web.Common.DTO.AudioLibrary.MusicLibrary;
using Lumina.Presentation.Web.Common.DTO.MediaContributors;
using Lumina.Presentation.Web.Common.Enums.AudioLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Presentation.Web.Common.Requests.Library.AudioLibrary.MusicLibrary.Albums;
/// <summary>
/// Represents a request to update an existing album of a music artist.
/// </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="Packaging">The outermost physical packaging of the album. Optional.</param>
/// <param name="Barcode">The barcode of the album. Optional.</param>
/// <param name="CatalogNumbers">The catalog numbers of the album. Optional.</param>
/// <param name="Label">The name of the label that issued the album. Optional.</param>
/// <param name="ASIN">The ASIN (Amazon Standard Identification 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>
[DebuggerDisplay("Title: {Metadata?.Title}")]
public record UpdateMusicAlbumRequest(
MusicAlbumMetadataDto? Metadata,
MusicMediaFormat? MediaFormat,
MusicReleasePackaging? Packaging,
string? Barcode,
List<string>? CatalogNumbers,
string? Label,
string? ASIN,
Guid? MusicBrainzReleaseId,
Guid? MusicBrainzReleaseGroupId,
Guid? MusicBrainzReleaseArtistId,
List<MediaContributorReferenceDto>? Contributors,
List<AudioRatingDto>? Ratings
);
@@ -0,0 +1,17 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Presentation.Web.Common.Requests.Library.AudioLibrary.MusicLibrary.Artists;
/// <summary>
/// Represents a request for displaying the details of a music artist.
/// </summary>
/// <param name="ArtistId">The unique identifier of the artist whose details are displayed, taken from the route. Required.</param>
/// <param name="LibraryId">The Id of the media library the artist belongs to. Required.</param>
[DebuggerDisplay("ArtistId: {ArtistId}")]
public record GetMusicArtistViewRequest(
string ArtistId,
Guid LibraryId
);
@@ -0,0 +1,34 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Presentation.Web.Common.Enums.Common;
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Presentation.Web.Common.Requests.Library.AudioLibrary.MusicLibrary.Artists;
/// <summary>
/// Represents a request to get the lightweight details of the artists of a media library.
/// </summary>
/// <param name="LibraryId">The unique identifier 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>
/// <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 is 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("LibraryId: {LibraryId}")]
public record GetMusicArtistsLiteRequest(
Guid LibraryId,
int? CurrentPage,
int? PerPage,
string? SearchTerm,
string? FilterAlphaKey,
bool ShouldIgnoreThePrefixForAlphaPicker,
string? SortBy,
SortOrder? SortOrder
);
@@ -0,0 +1,15 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Presentation.Web.Common.Requests.Library.AudioLibrary.MusicLibrary.Artists;
/// <summary>
/// Represents a request for displaying the music artists browsing view.
/// </summary>
/// <param name="LibraryId">The unique identifier of the media library whose artists are browsed. Optional.</param>
[DebuggerDisplay("LibraryId: {LibraryId}")]
public record GetMusicArtistsViewRequest(
Guid? LibraryId
);
@@ -0,0 +1,46 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Presentation.Web.Common.DTO.AudioLibrary;
using Lumina.Presentation.Web.Common.DTO.AudioLibrary.MusicLibrary;
using Lumina.Presentation.Web.Common.DTO.MediaContributors;
using Lumina.Presentation.Web.Common.Enums.AudioLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Presentation.Web.Common.Requests.Library.AudioLibrary.MusicLibrary.Artists;
/// <summary>
/// Represents a request to update an album of an artist, together with the tracks of the album, within an artist update.
/// </summary>
/// <param name="AlbumId">The Id of the album, when the album already exists. Optional.</param>
/// <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="Packaging">The outermost physical packaging of the album. Optional.</param>
/// <param name="Barcode">The barcode of the album. Optional.</param>
/// <param name="CatalogNumbers">The catalog numbers of the album. Optional.</param>
/// <param name="Label">The name of the label that issued the album. Optional.</param>
/// <param name="ASIN">The ASIN (Amazon Standard Identification 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, each with the Id of the track when the track already exists. Required.</param>
[DebuggerDisplay("Title: {Metadata?.Title}")]
public record UpdateMusicArtistAlbumRequest(
Guid? AlbumId,
MusicAlbumMetadataDto? Metadata,
MusicMediaFormat? MediaFormat,
MusicReleasePackaging? Packaging,
string? Barcode,
List<string>? CatalogNumbers,
string? Label,
string? ASIN,
Guid? MusicBrainzReleaseId,
Guid? MusicBrainzReleaseGroupId,
Guid? MusicBrainzReleaseArtistId,
List<MediaContributorReferenceDto>? Contributors,
List<AudioRatingDto>? Ratings,
List<UpdateMusicArtistTrackRequest>? Tracks
);
@@ -0,0 +1,33 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Presentation.Web.Common.DTO.AudioLibrary;
using Lumina.Presentation.Web.Common.DTO.AudioLibrary.MusicLibrary;
using Lumina.Presentation.Web.Common.DTO.MediaContributors;
using System;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Presentation.Web.Common.Requests.Library.AudioLibrary.MusicLibrary.Artists;
/// <summary>
/// Represents a request to update a music artist, together with the albums of the artist and the tracks of those albums.
/// </summary>
/// <param name="Metadata">The metadata 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="Ipis">The list of IPI (Interested Party Information) codes of the artist. Optional.</param>
/// <param name="Isnis">The list of ISNI (International Standard Name Identifier) codes of the artist. Optional.</param>
/// <param name="Contributors">The list of media contributors that make up the artist. Required.</param>
/// <param name="Ratings">The list of ratings for 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: {Metadata?.Name}")]
public record UpdateMusicArtistRequest(
MusicArtistMetadataDto? Metadata,
string? Website,
Guid? MusicBrainzArtistId,
List<string>? Ipis,
List<string>? Isnis,
List<MediaContributorReferenceDto>? Contributors,
List<AudioRatingDto>? Ratings,
List<UpdateMusicArtistAlbumRequest>? Albums
);
@@ -0,0 +1,49 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Presentation.Web.Common.DTO.AudioLibrary;
using Lumina.Presentation.Web.Common.DTO.AudioLibrary.MusicLibrary;
using Lumina.Presentation.Web.Common.DTO.Common;
using Lumina.Presentation.Web.Common.DTO.MediaContributors;
using Lumina.Presentation.Web.Common.Enums.AudioLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Presentation.Web.Common.Requests.Library.AudioLibrary.MusicLibrary.Artists;
/// <summary>
/// Represents a request to update a track of an album of an artist, within an artist update.
/// </summary>
/// <param name="TrackId">The Id of the track, when the track already exists. Optional.</param>
/// <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 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="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 UpdateMusicArtistTrackRequest(
Guid? TrackId,
string? Path,
MusicTrackMetadataDto? Metadata,
int? TrackNumber,
int? DiscNumber,
string? Script,
MusicKey? Key,
int? Bpm,
MusicWorkDto? Work,
Guid? MusicBrainzRecordingId,
Guid? MusicBrainzTrackId,
List<MoodDto>? Moods,
List<IsrcDto>? Isrcs,
List<MediaContributorReferenceDto>? Contributors,
List<AudioRatingDto>? Ratings
);
@@ -0,0 +1,23 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Presentation.Web.Common.Requests.Library.AudioLibrary.MusicLibrary.Tracks;
/// <summary>
/// Represents a request to get the lightweight details of the tracks of an album.
/// </summary>
/// <param name="ArtistId">The unique identifier of the artist the album belongs to, taken from the route. Required.</param>
/// <param name="AlbumId">The unique identifier of the album whose tracks are retrieved, taken from the route. Required.</param>
/// <param name="LibraryId">The unique identifier of the media library the album belongs to. Required.</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(
string ArtistId,
string AlbumId,
Guid LibraryId,
int? CurrentPage,
int? PerPage
);
@@ -0,0 +1,21 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Presentation.Web.Common.Requests.Library.AudioLibrary.MusicLibrary.Tracks;
/// <summary>
/// Represents a request for displaying the details of a track of an album of a music artist.
/// </summary>
/// <param name="ArtistId">The unique identifier of the artist the album belongs to, taken from the route. Required.</param>
/// <param name="AlbumId">The unique identifier of the album the track belongs to, taken from the route. Required.</param>
/// <param name="TrackId">The unique identifier of the track whose details are displayed, taken from the route. Required.</param>
/// <param name="LibraryId">The Id of the media library the track belongs to. Required.</param>
[DebuggerDisplay("TrackId: {TrackId}")]
public record GetMusicTrackViewRequest(
string ArtistId,
string AlbumId,
string TrackId,
Guid LibraryId
);
@@ -0,0 +1,47 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Presentation.Web.Common.DTO.AudioLibrary;
using Lumina.Presentation.Web.Common.DTO.AudioLibrary.MusicLibrary;
using Lumina.Presentation.Web.Common.DTO.Common;
using Lumina.Presentation.Web.Common.DTO.MediaContributors;
using Lumina.Presentation.Web.Common.Enums.AudioLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Presentation.Web.Common.Requests.Library.AudioLibrary.MusicLibrary.Tracks;
/// <summary>
/// Represents a request to update an existing track of an album of a music artist.
/// </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 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="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 UpdateMusicTrackRequest(
string? Path,
MusicTrackMetadataDto? Metadata,
int? TrackNumber,
int? DiscNumber,
string? Script,
MusicKey? Key,
int? Bpm,
MusicWorkDto? Work,
Guid? MusicBrainzRecordingId,
Guid? MusicBrainzTrackId,
List<MoodDto>? Moods,
List<IsrcDto>? Isrcs,
List<MediaContributorReferenceDto>? Contributors,
List<AudioRatingDto>? Ratings
);