feat(backend): signage playlists and slides, screens, built-in pictures (platform-v2 step 5.4a)
- signage_playlists (name, orientation, default transition) and signage_slides (kind menu | image | video | text, position, duration, transition, video to its end, on/off, days / hours / dates, content typed per kind: extra fields refused, pictures / videos as media ids). Alembic 0029. - /api/signage: playlists CRUD, duplicate, timeline order; slides add (at a position), change, delete, duplicate; screens (playlist, orientation, rotation, orientation mismatch). The screen's GET /api/signage/screen gives its playlist resolved for playing with a version hash. Changes send signage.changed only to the screens playing that playlist. - Signage device config: playlist (ref signage_playlists), orientation, rotation. Slides register their media usage. - Built-in pictures: assets/builtin_media/ imported at start (media.builtin), a collection of their own (?collection=builtin|own), never deleted or renamed (media.builtin). - tests: test_signage.py (8); 509 passed. Pack README: the signage row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -105,6 +105,13 @@ CODES: dict[str, tuple[int, str]] = {
|
||||
"media.unreadable": (422, "This picture can't be read. Save it again as JPG or PNG and upload it."),
|
||||
"media.in_use": (409, "This file is used by {uses}. Remove it there first."),
|
||||
"media.not_a_picture": (422, "Pick a picture here, not a video."),
|
||||
"signage.playlist_unknown": (404, "Playlist {playlist_id} not found."),
|
||||
"signage.slide_unknown": (404, "Slide {slide_id} not found."),
|
||||
"signage.not_a_screen": (404, "Device {device_id} isn't a signage screen."),
|
||||
"signage.not_a_video": (422, "Pick a video for this slide."),
|
||||
"signage.content_invalid": (422, "This slide's setting isn't valid ({field}: {reason})."),
|
||||
"signage.order_mismatch": (409, "The playlist changed in the meantime. Reload it and try again."),
|
||||
"media.builtin": (409, "Built-in pictures can't be deleted or renamed."),
|
||||
"reservation.not_found": (404, "Booking {reservation_id} not found."),
|
||||
"reservation.status_changed": (409, "This booking was changed on another screen in the meantime (it is now {current})."),
|
||||
"reservation.table_unknown": (404, "Table {table_id} not found."),
|
||||
|
||||
Reference in New Issue
Block a user