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:
@@ -54,6 +54,11 @@ async def lifespan(app: FastAPI):
|
||||
_db = SessionLocal()
|
||||
try:
|
||||
apply_retention_setting(_db)
|
||||
from services.media import import_builtin
|
||||
try:
|
||||
import_builtin(_db) # pictures shipped with the server (5.4a)
|
||||
except Exception as e: # never blocks the start
|
||||
logger.warning("built-in pictures not imported: %s", e)
|
||||
finally:
|
||||
_db.close()
|
||||
logger.info("startup version=%s", settings.VERSION)
|
||||
|
||||
Reference in New Issue
Block a user