Make release Medium writable via upload + meta-edit; resolve detail-page track by releaseId not album title

This commit is contained in:
daniel-c-harvey
2026-06-13 11:34:45 -04:00
parent ea018beb3e
commit 8b62915083
15 changed files with 314 additions and 28 deletions
+4 -2
View File
@@ -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,
};