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:
2026-11-17 18:35:13 +02:00
co-authored by Claude Opus 5.5
parent 51b764fe7e
commit 7fc32ad917
18 changed files with 951 additions and 7 deletions
+10 -1
View File
@@ -134,9 +134,18 @@
"too_many_pixels": "Η εικόνα είναι πολύ μεγάλη (έως {{max_mp}} megapixel).",
"unreadable": "Αυτή η εικόνα δεν διαβάζεται. Αποθηκεύστε τη ξανά ως JPG ή PNG και ανεβάστε τη.",
"in_use": "Αυτό το αρχείο χρησιμοποιείται από: {{uses}}. Αφαιρέστε το πρώτα από εκεί.",
"not_a_picture": "Εδώ διαλέξτε εικόνα, όχι βίντεο."
"not_a_picture": "Εδώ διαλέξτε εικόνα, όχι βίντεο.",
"builtin": "Οι ενσωματωμένες εικόνες δεν διαγράφονται ούτε μετονομάζονται."
},
"caller_id": {
"key_invalid": "Το κλειδί του τηλεφωνικού κέντρου λείπει ή είναι λάθος."
},
"signage": {
"playlist_unknown": "Η λίστα {{playlist_id}} δεν βρέθηκε.",
"slide_unknown": "Η διαφάνεια {{slide_id}} δεν βρέθηκε.",
"not_a_screen": "Η συσκευή {{device_id}} δεν είναι οθόνη προβολής.",
"not_a_video": "Διαλέξτε βίντεο για αυτή τη διαφάνεια.",
"content_invalid": "Μια ρύθμιση της διαφάνειας δεν είναι έγκυρη ({{field}}: {{reason}}).",
"order_mismatch": "Η λίστα άλλαξε στο μεταξύ. Φορτώστε τη ξανά και δοκιμάστε πάλι."
}
}
+25
View File
@@ -386,6 +386,31 @@
},
"permissions": {
"manage": "Επεξεργασία περιεχομένου σήμανσης"
},
"config": {
"playlist": {
"label": "Λίστα προβολής",
"hint": "Τι παίζει αυτή η οθόνη (Προβολή).",
"none": "Τίποτα (κενή οθόνη)"
},
"orientation": {
"label": "Προσανατολισμός",
"hint": "Πώς κρέμεται η τηλεόραση: οι διαφάνειες φτιάχνονται για αυτό το σχήμα.",
"choices": {
"landscape": "Οριζόντια (φαρδιά)",
"portrait": "Κάθετη (ψηλή)"
}
},
"rotation": {
"label": "Περιστροφή εικόνας",
"hint": "Για τηλεόραση τοποθετημένη πλάγια που δεν γυρίζει μόνη της την εικόνα.",
"choices": {
"0": "Όχι",
"90": "90° δεξιά",
"180": "Ανάποδα",
"270": "90° αριστερά"
}
}
}
},
"staff_planning": {
+10 -1
View File
@@ -134,9 +134,18 @@
"too_many_pixels": "The picture is too large (at most {{max_mp}} megapixels).",
"unreadable": "This picture can't be read. Save it again as JPG or PNG and upload it.",
"in_use": "This file is used by {{uses}}. Remove it there first.",
"not_a_picture": "Pick a picture here, not a video."
"not_a_picture": "Pick a picture here, not a video.",
"builtin": "Built-in pictures can't be deleted or renamed."
},
"caller_id": {
"key_invalid": "The phone system's key is missing or wrong."
},
"signage": {
"playlist_unknown": "Playlist {{playlist_id}} not found.",
"slide_unknown": "Slide {{slide_id}} not found.",
"not_a_screen": "Device {{device_id}} isn't a signage screen.",
"not_a_video": "Pick a video for this slide.",
"content_invalid": "This slide's setting isn't valid ({{field}}: {{reason}}).",
"order_mismatch": "The playlist changed in the meantime. Reload it and try again."
}
}
+25
View File
@@ -386,6 +386,31 @@
},
"permissions": {
"manage": "Edit signage content"
},
"config": {
"playlist": {
"label": "Playlist",
"hint": "What this screen plays (Signage).",
"none": "Nothing (a blank screen)"
},
"orientation": {
"label": "Orientation",
"hint": "How the TV hangs: slides are built for this shape.",
"choices": {
"landscape": "Landscape (wide)",
"portrait": "Portrait (tall)"
}
},
"rotation": {
"label": "Turn the picture",
"hint": "For a TV mounted sideways that can't turn the picture itself.",
"choices": {
"0": "No",
"90": "90° right",
"180": "Upside down",
"270": "90° left"
}
}
}
},
"staff_planning": {