mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 18:21:10 +00:00
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:
1 parent
728a879bb8
commit
1aa427b1e2
29 files changed
+47
-243
No files matched your search
-5
@@ -39,7 +39,6 @@ public class UpdateTrackCommandFixture
|
||||
/// <param name="artistId">Optional. The Id of the artist the track belongs to.</param>
|
||||
/// <param name="albumId">Optional. The Id of the album the track belongs to.</param>
|
||||
/// <param name="trackId">Optional. The Id of the track to update.</param>
|
||||
/// <param name="path">Optional. The file system path of the track.</param>
|
||||
/// <param name="metadata">Optional. The audio metadata of the track.</param>
|
||||
/// <param name="trackNumber">Optional. The number of the track on its disc.</param>
|
||||
/// <param name="discNumber">Optional. The number of the disc the track belongs to.</param>
|
||||
@@ -69,7 +68,6 @@ public class UpdateTrackCommandFixture
|
||||
/// <param name="includeArtistId">Whether the artist Id should be included, or forced to <see langword="null"/>.</param>
|
||||
/// <param name="includeAlbumId">Whether the album Id should be included, or forced to <see langword="null"/>.</param>
|
||||
/// <param name="includeTrackId">Whether the track Id should be included, or forced to <see langword="null"/>.</param>
|
||||
/// <param name="includePath">Whether the path should be included, or forced to <see langword="null"/>.</param>
|
||||
/// <param name="includeTrackNumber">Whether the track number should be included, or forced to <see langword="null"/>.</param>
|
||||
/// <returns>The created command to update a track.</returns>
|
||||
public UpdateTrackCommand Create(
|
||||
@@ -77,7 +75,6 @@ public class UpdateTrackCommandFixture
|
||||
string? artistId = null,
|
||||
string? albumId = null,
|
||||
string? trackId = null,
|
||||
string? path = null,
|
||||
MusicTrackMetadataDto? metadata = null,
|
||||
int? trackNumber = null,
|
||||
int? discNumber = null,
|
||||
@@ -107,7 +104,6 @@ public class UpdateTrackCommandFixture
|
||||
bool includeArtistId = true,
|
||||
bool includeAlbumId = true,
|
||||
bool includeTrackId = true,
|
||||
bool includePath = true,
|
||||
bool includeTrackNumber = true)
|
||||
{
|
||||
return new UpdateTrackCommand(
|
||||
@@ -115,7 +111,6 @@ public class UpdateTrackCommandFixture
|
||||
includeArtistId ? (artistId ?? _faker.Random.Guid().ToString()) : null,
|
||||
includeAlbumId ? (albumId ?? _faker.Random.Guid().ToString()) : null,
|
||||
includeTrackId ? (trackId ?? _faker.Random.Guid().ToString()) : null,
|
||||
includePath ? (path ?? _faker.System.FilePath()) : null,
|
||||
includeMetadata ? (metadata ?? _musicTrackMetadataDtoFixture.Create()) : null,
|
||||
includeTrackNumber ? (trackNumber ?? _faker.Random.Int(1, 20)) : null,
|
||||
includeDiscNumber ? (discNumber ?? _faker.Random.Int(1, 3)) : null,
|
||||
|
||||
Reference in new issue
Block a user