Make release Medium writable via upload + meta-edit; resolve detail-page track by releaseId not album title
This commit is contained in:
@@ -64,8 +64,8 @@ public class CmsTrackService : ICmsTrackService
|
||||
multipart.Add(new StringContent(createdByUserId.ToString()), "createdByUserId");
|
||||
multipart.Add(new StringContent(releaseType.ToString()), "releaseType");
|
||||
multipart.Add(new StringContent(trackNumber.ToString()), "trackNumber");
|
||||
// Forward-compatible: the upload endpoint does not bind a "medium" field yet (server defaults
|
||||
// to Cut). Sent so the value round-trips once the API grows the parameter; ignored until then.
|
||||
// The upload endpoint binds "medium" to the created release's ReleaseMedium (defaulting to Cut
|
||||
// for an unrecognised value). Authoritative only when this upload creates the release.
|
||||
multipart.Add(new StringContent(medium.ToString()), "medium");
|
||||
|
||||
var client = _httpClientFactory.CreateClient(ContentCmsClientName);
|
||||
@@ -374,6 +374,7 @@ public class CmsTrackService : ICmsTrackService
|
||||
string? album, string? genre, DateOnly? releaseDate,
|
||||
string? imagePath = null,
|
||||
ReleaseType? releaseType = null,
|
||||
ReleaseMedium? medium = null,
|
||||
int? trackNumber = null,
|
||||
CancellationToken ct = default)
|
||||
{
|
||||
@@ -387,6 +388,7 @@ public class CmsTrackService : ICmsTrackService
|
||||
releaseDate,
|
||||
imagePath,
|
||||
releaseType = releaseType.HasValue ? (int?)releaseType.Value : null,
|
||||
medium = medium.HasValue ? (int?)medium.Value : null,
|
||||
trackNumber,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user