Changes
This commit is contained in:
@@ -9,7 +9,6 @@ using Musify.Domain.ValueObjects;
|
||||
|
||||
namespace Musify.Application.Albums
|
||||
{
|
||||
/// <summary>Appends your own tracks to an album in the given order, skipping the ones it already has.</summary>
|
||||
public record AddTracksToAlbumCommand(long UserId, Guid AlbumId, IReadOnlyList<Guid> TrackIds)
|
||||
: ICommand<ErrorOr<Success>>;
|
||||
|
||||
@@ -50,7 +49,6 @@ namespace Musify.Application.Albums
|
||||
if (toAdd.Count == 0)
|
||||
return Result.Success;
|
||||
|
||||
// Album track numbers are user-visible, so they start at 1.
|
||||
var nextTrackNumber = (await database.AlbumHasTracks
|
||||
.Where(link => link.AlbumId == request.AlbumId)
|
||||
.MaxAsync(link => (int?)link.TrackNumber, cancellationToken) ?? 0) + 1;
|
||||
|
||||
@@ -30,7 +30,6 @@ namespace Musify.Application.Albums
|
||||
var album = found.Value;
|
||||
var title = request.Title.Trim();
|
||||
|
||||
// This is a full replace of the plain fields; the picture has its own command.
|
||||
album.Title = title;
|
||||
album.NormalizedTitle = TextNormalizer.Normalize(title);
|
||||
album.Description = string.IsNullOrWhiteSpace(request.Description) ? null : request.Description.Trim();
|
||||
|
||||
@@ -13,7 +13,6 @@ using Musify.Domain.ValueObjects;
|
||||
|
||||
namespace Musify.Application.Albums
|
||||
{
|
||||
/// <summary>Replaces an album's picture with a previously uploaded image; the plain fields are untouched.</summary>
|
||||
public record UpdateAlbumPictureCommand(long UserId, Guid AlbumId, Guid PictureIntentId)
|
||||
: ICommand<ErrorOr<AlbumApplicationResponse>>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user