GRI-2174: playlist with a URL item cannot be saved a second time #306
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!306
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/GRI-2174-playlist-url-item-resave"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes grimoire-of-digital-signage#302.
A URL (or page) playlist item read back from the server lost its
kind/url/page. On the next save,replacePlaylistItemslooked the item up in the library bymedia_id, found nothing for an empty id, and guessedkind: "image"withmedia_id: ""— which the server rejects with a UUID parse error.Fix
itemFromWirenow keepskind,urlandpageon thePlaylistItem(frontend-web/src/api/types.ts).replacePlaylistItemssends an item from its ownkind/url/pagewhen the library lookup bymedia_idhas nothing (nomedia_id, or not found in the library). It never sendsmedia_id: ""and never guesses'image'— it throws if no kind is available at all (frontend-web/src/api/httpPlaylistsApi.ts).Test plan
scripts/local-gates.sh --frontend-onlypasses (prettier, oxlint, tsc, vitest, build).{kind:"url", url:...}with nomedia_id.