Removes track path editing from the music track update flow

Stops Track.UpdateDetails and Artist.UpdateTrackInAlbum from assigning a path, so a track path can be set only when the track is created. Removes Path from UpdateTrackRequest, UpdateTrackCommand, UpdateTrackCommandValidator and UpdateMusicTrackRequest, and removes the path containment check and IPathService dependency from UpdateTrackCommandHandler. The path stays visible in TrackResponse, MusicTrackDto and the read-only field of the track page. Updates the endpoint summary, request and API docs, and the affected tests.
This commit is contained in:
BinaryAlley committed 2026-10-13 20:14:12 +03:00
1 parent 728a879bb8
commit 1aa427b1e2
29 files changed
+47 -243

No files matched your search

@@ -14,7 +14,6 @@ namespace Lumina.Presentation.Web.Common.Requests.Library.AudioLibrary.MusicLibr
/// <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>
@@ -30,7 +29,6 @@ namespace Lumina.Presentation.Web.Common.Requests.Library.AudioLibrary.MusicLibr
/// <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,
@@ -95,10 +95,10 @@
<div class="book-details-form">
<!-- General information. -->
<h3 class="text-light-two">@_localizer["GeneralInformation"]</h3>
<!-- Path. -->
<!-- Path (read-only: a track path is set only by the scanner, it can never be edited). -->
<div class="form-row">
<div class="form-label"><label for="track-path">@_localizer["TrackPath"]</label>:</div>
<div class="form-field"><input id="track-path" type="text" class="enlightenment-input" value="@(Model.Path ?? string.Empty)" /></div>
<div class="form-label">@_localizer["TrackPath"]:</div>
<div class="form-field"><span id="track-path" style="word-break: break-all;">@(Model.Path ?? string.Empty)</span></div>
<small class="form-label text-disabled form-description">@_localizer["TrackPathDescription"]</small>
</div>
<!-- Title. -->
@@ -793,9 +793,9 @@
}
// Builds the payload of the edited track, matching the update request of the API.
// The file system path is not included: a track path is set only by the scanner and can never be edited.
function buildPayload() {
return {
Path: readValue('track-path') || null,
Metadata: {
Title: readValue('track-title'),
OriginalTitle: readValue('track-original-title') || null,