GRI-1937: a whole PDF can be added to a playlist #153
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!153
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/GRI-1937-playlist-document"
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?
Board issue GRI-1937. The product owner hit
item 0: "document" is not a known item kindwhen saving a playlist with a PDF from the library.Cause: the library lists an uploaded PDF as one
documentrow, which the playlist API never accepted. Its pages could not be saved correctly either, because the panel sent nopageand the server stored no page number or parent link on page rows.Change
media.document_idandmedia.pageondocument_pagerows, plus a backfill for existing pages. A PDF is linked only when the number of attributed pages equalspdf_pages. If it does not match, the pages stay unlinked rather than being linked wrongly.PUT /playlists/{id}/items:kind: "document"expands into onedocument_pageper page, in page order. Adocument_pagewithoutpagetakes its page number from the media row.documentfor a whole PDF andpagefor a single page, and labels library entries "(all pages)" / "— page N".Tested locally: clippy
-D warnings, the media and playlist integration suites against Postgres (33 tests, including the backfill and the cascade delete), andnpm run check(32 tests).