API gap: filler preset + watermark editor CRUD; FFmpeg profile response DTO round-trip (#143 blocker) #159

Closed
opened 2026-07-07 13:23:34 +02:00 by timothy · 1 comment
Owner

Recon for #143 (2026-07-07) — blocks #91 phase (b), part of epic #59. Pattern follows #151–#153/#155.

All Create/Update/Delete MediatR handlers already exist and are exercised by Blazor; missing pieces are controller/DTO plumbing:

  1. FFmpeg profile response DTO not round-trip complete: full CRUD exists (FFmpegProfileController.cs), and the request DTOs carry all ~30 fields, but FFmpegFullProfileResponseModel omits NormalizeAudio, NormalizeVideo, PadMode, TargetLoudness, NormalizeColors, and exposes Resolution as a name string instead of ResolutionId (editor binds by id); DeinterlaceVideo is bool? in response vs bool in request. An edit screen can't load-then-save without losing state. Extend the DTO + Mapper.ProjectToFullResponseModel.
  2. Hardware-acceleration kinds lookup: no endpoint for GetSupportedHardwareAccelerationKinds (Blazor-only MediatR). Needed to populate the hwaccel select. (VAAPI displays/devices come from IMemoryCache — minor, can default in SPA. Video presets list is computed by FFmpegLibraryHelper.PresetsForFFmpegProfile from hwaccel+format+bitdepth — nice-to-have lookup endpoint or replicate client-side.)
  3. Filler presets: GET /api/filler-presets is picker-grade (Id+Name only). Need GET-by-id, POST, PUT, DELETE + full DTOs (~16 fields incl. FillerKind/FillerMode/Duration/Count/PadToNearestMinute/AllowWatermarks/CollectionType + collection refs/UseChaptersAsMediaItems/Expression). Handlers: ErsatzTV.Application/Filler/Commands/.
  4. Watermarks: GET /api/watermarks is picker-grade. Need GET-by-id, POST, PUT, DELETE + full DTOs (15 fields: Mode/ImageSource/Image/Location/Size/Width/margins/Frequency/Duration/Opacity/OpacityExpression/ZIndex/PlaceWithinSourceContent). Image upload is ALREADY covered by POST /api/artwork/uploads?target=watermark (#104).

DTOs in ErsatzTV.Core/Api with file-scoped #nullable enable.

Recon for #143 (2026-07-07) — blocks #91 phase (b), part of epic #59. Pattern follows #151–#153/#155. All Create/Update/Delete MediatR handlers already exist and are exercised by Blazor; missing pieces are controller/DTO plumbing: 1. **FFmpeg profile response DTO not round-trip complete**: full CRUD exists (`FFmpegProfileController.cs`), and the request DTOs carry all ~30 fields, but `FFmpegFullProfileResponseModel` omits `NormalizeAudio`, `NormalizeVideo`, `PadMode`, `TargetLoudness`, `NormalizeColors`, and exposes `Resolution` as a name string instead of `ResolutionId` (editor binds by id); `DeinterlaceVideo` is `bool?` in response vs `bool` in request. An edit screen can't load-then-save without losing state. Extend the DTO + `Mapper.ProjectToFullResponseModel`. 2. **Hardware-acceleration kinds lookup**: no endpoint for `GetSupportedHardwareAccelerationKinds` (Blazor-only MediatR). Needed to populate the hwaccel select. (VAAPI displays/devices come from IMemoryCache — minor, can default in SPA. Video presets list is computed by `FFmpegLibraryHelper.PresetsForFFmpegProfile` from hwaccel+format+bitdepth — nice-to-have lookup endpoint or replicate client-side.) 3. **Filler presets**: `GET /api/filler-presets` is picker-grade (`Id`+`Name` only). Need GET-by-id, POST, PUT, DELETE + full DTOs (~16 fields incl. FillerKind/FillerMode/Duration/Count/PadToNearestMinute/AllowWatermarks/CollectionType + collection refs/UseChaptersAsMediaItems/Expression). Handlers: `ErsatzTV.Application/Filler/Commands/`. 4. **Watermarks**: `GET /api/watermarks` is picker-grade. Need GET-by-id, POST, PUT, DELETE + full DTOs (15 fields: Mode/ImageSource/Image/Location/Size/Width/margins/Frequency/Duration/Opacity/OpacityExpression/ZIndex/PlaceWithinSourceContent). Image upload is ALREADY covered by `POST /api/artwork/uploads?target=watermark` (#104). DTOs in ErsatzTV.Core/Api with file-scoped `#nullable enable`.
Author
Owner

Fully implemented and merged in PR #166 (main e0f36a12) alongside the #143 screens: FFmpeg response DTO round-trip complete + GET /api/ffmpeg/hardware-acceleration-kinds; full CRUD for filler presets and watermarks with editor-grade DTOs; 20 new OpenAPI error-contract test cases; bonus fixes (404-vs-422 on missing-id PUT/DELETE, WatermarkLocation/Size string-enum spec correction). VAAPI display/device lookup deliberately not added (free-text in SPA, values round-trip). Closing.

Fully implemented and merged in PR #166 (main e0f36a12) alongside the #143 screens: FFmpeg response DTO round-trip complete + `GET /api/ffmpeg/hardware-acceleration-kinds`; full CRUD for filler presets and watermarks with editor-grade DTOs; 20 new OpenAPI error-contract test cases; bonus fixes (404-vs-422 on missing-id PUT/DELETE, WatermarkLocation/Size string-enum spec correction). VAAPI display/device lookup deliberately not added (free-text in SPA, values round-trip). Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: timothy/ersatztv#159