docs(525): record download-on-save decision; update channels + api-conventions
New lifecycle record graphics.channel-logo-caching (supersedes: none — narrows for YAML image elements). Regenerated the active catalog. channels.md + api- conventions.md updated for the new save-time download + 400s.
This commit is contained in:
+17
-6
@@ -282,12 +282,23 @@ mappers) for new API DTOs — those still return the old Blazor-convention relat
|
||||
the domain/VM directly and root the path yourself, following the PR #181 pattern.
|
||||
|
||||
Channel **logos** live under a different route than posters/thumbnails: an uploaded logo roots to
|
||||
`/iptv/logos/{file}` (served by `IptvController`), and an external logo is an absolute URL passed
|
||||
through unchanged. Browse-surface DTOs (`ChannelResponseModel` list, `ChannelGuideChannelResponseModel`
|
||||
guide) get this rooted `Logo` URL from the single `Channels.Mapper.GetLogoUrl` helper (#464), which
|
||||
returns `null` when the channel has no logo so the SPA falls back to its generated initials icon. The
|
||||
raw un-rooted `{path, contentType}` form is still used only by the channel **editor** DTO
|
||||
(`ChannelDetailResponseModel.Logo`), which round-trips it back on save.
|
||||
`/iptv/logos/{file}` (served by `IptvController`). An **external logo URL is no longer stored as a URL** —
|
||||
since #525, `PUT`/`POST /api/v1/channels…` downloads it, decode-validates it, and caches it at save
|
||||
time, so `Artwork.Path` holds a content-hash name and the browse/guide DTOs emit an `/iptv/logos/…`
|
||||
URL exactly as for an uploaded logo. Browse-surface DTOs (`ChannelResponseModel` list,
|
||||
`ChannelGuideChannelResponseModel` guide) get this rooted `Logo` URL from the single
|
||||
`Channels.Mapper.GetLogoUrl` helper (#464), which returns `null` when the channel has no logo so the
|
||||
SPA falls back to its generated initials icon. The raw un-rooted `{path, contentType}` form is still
|
||||
used only by the channel **editor** DTO (`ChannelDetailResponseModel.Logo`), which round-trips it back
|
||||
on save.
|
||||
|
||||
**New 400s from the logo download (#525).** `PUT /api/v1/channels/{id}`, the two channel-create
|
||||
endpoints, and `POST /api/v1/artwork/uploads` now return a **400** (`BaseError` → `ProblemDetails`)
|
||||
when a supplied logo cannot be used: an external URL that is unreachable, times out (>10s), is
|
||||
oversized (>10 MiB), is not an image, or is a decode bomb (over 50 MP total pixels or 600 frames);
|
||||
an upload gets the same decode-budget check. The message names the reason
|
||||
(e.g. *"Could not download logo from … : …"*, *"Image cannot be used: … pixel limit"*). Response
|
||||
**shapes are unchanged** — only the error status/message set — so the OpenAPI models did not change.
|
||||
|
||||
`GET /api/v1/watermarks` returns picker-grade rows that carry `imageSource` alongside `id`/`name`
|
||||
(#67), so a client can find the seeded logo-driven `Channel Bug` preset without matching its
|
||||
|
||||
Reference in New Issue
Block a user