#region ========================================================================= USING =====================================================================================
using Lumina.Application.Core.MediaLibrary.AudioLibrary.MusicLibrary.Tracks.Commands.UpdateTrack;
using Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.Tracks;
#endregion
namespace Lumina.Application.Common.Mapping.MediaLibrary.AudioLibrary.MusicLibrary.Tracks;
///
/// Extension methods for converting .
///
public static class UpdateTrackRequestMapping
{
///
/// Converts to .
///
/// The request to be converted.
/// The Id of the library the track belongs to, taken from the route.
/// The Id of the artist the track belongs to, taken from the route.
/// The Id of the album the track belongs to, taken from the route.
/// The Id of the track to update, taken from the route.
/// The converted command.
public static UpdateTrackCommand ToCommand(this UpdateTrackRequest request, string? libraryId, string? artistId, string? albumId, string? trackId)
{
return new UpdateTrackCommand(
libraryId,
artistId,
albumId,
trackId,
request.Path,
request.Metadata,
request.TrackNumber,
request.DiscNumber,
request.Script,
request.Key,
request.Bpm,
request.Work,
request.MusicBrainzRecordingId,
request.MusicBrainzTrackId,
request.MusicBrainzWorkId,
request.Ratings,
request.Moods,
request.Isrcs);
}
}