Skip to content

[Assets] Add video thumbnail status endpoint for Studio polling#1810

Merged
markus-moser merged 2 commits into
2025.4from
3407-fix-video-thumbnail-status-endpoint
Jun 16, 2026
Merged

[Assets] Add video thumbnail status endpoint for Studio polling#1810
markus-moser merged 2 commits into
2025.4from
3407-fix-video-thumbnail-status-endpoint

Conversation

@markus-moser

@markus-moser markus-moser commented May 5, 2026

Copy link
Copy Markdown
Contributor

Changes in this pull request

Resolves pimcore/studio-ui-bundle#3407

Adds GET /pimcore-studio/api/assets/{id}/video/thumbnail/{thumbnailName}/status returning {status: finished | inprogress | error | not_started}.

studio-ui-bundle polls this while a Video editable is in the in-progress state and reloads the editor when conversion finishes. No existing endpoint exposes this — BinaryService only uses the status internally to decide between streaming and throwing ElementProcessingNotCompletedException.

Additional info

Companion PRs:

🚧 Draft pending the companion PRs above.

@codacy-production

codacy-production Bot commented May 5, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 critical · 18 minor

Alerts:
⚠ 1 issue (≤ 0 issues of at least high severity)
⚠ 1 issue (≤ 0 issues of at least medium severity)

Results:
19 new issues

Category Results
Security 1 critical
CodeStyle 18 minor

View in Codacy

🟢 Metrics 5 complexity

Metric Results
Complexity 5

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Studio needs a way to detect when an inprogress video thumbnail
finishes converting so it can refresh the editor automatically.
Today the only consumer of the thumbnail status is BinaryService,
which uses it internally to decide whether to stream or throw
ElementProcessingNotCompletedException - it isn't exposed to clients.

Adds GET /pimcore-studio/api/assets/{id}/video/thumbnail/{thumbnailName}/status
returning {status: finished | inprogress | error | not_started}.
studio-ui-bundle polls this endpoint while a Video editable is in
the in-progress state and reloads the editor when conversion finishes.

Resolves pimcore/studio-ui-bundle#3407
@markus-moser markus-moser force-pushed the 3407-fix-video-thumbnail-status-endpoint branch from 49f7109 to d1edb64 Compare May 5, 2026 14:36
@sonarqubecloud

sonarqubecloud Bot commented May 5, 2026

Copy link
Copy Markdown

…nd unit test

- VideoService::getThumbnailStatus() now reads the status from the asset's
  'thumbnails' custom setting instead of calling Asset\Video::getThumbnail():
  getThumbnail() starts a conversion as a side effect (a GET endpoint should be
  read-only) and returns null for errored conversions, which made the 'error'
  status unreachable and left polling clients spinning forever
- add the missing studio_api_docs.en.yaml entries for the new endpoint
- add a unit test for the status mapping
@sonarqubecloud

Copy link
Copy Markdown

@markus-moser markus-moser marked this pull request as ready for review June 16, 2026 13:50
@markus-moser markus-moser requested a review from lukmzig June 16, 2026 13:50
@markus-moser markus-moser changed the title [Bug] Add video thumbnail status endpoint for Studio polling [Assets] Add video thumbnail status endpoint for Studio polling Jun 16, 2026
@markus-moser markus-moser merged commit 4514e77 into 2025.4 Jun 16, 2026
12 of 13 checks passed
@markus-moser markus-moser deleted the 3407-fix-video-thumbnail-status-endpoint branch June 16, 2026 14:55
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants