summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/src/meshbay_node/ui/app.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-24 14:33:38 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-24 14:33:38 +0200
commit317f09328ed8bf20148b707470c9b0fe82e59575 (patch)
treeba8daf5dcf050d44b7b0e766babbfda8fadac59f /packages/meshbay-node/src/meshbay_node/ui/app.py
parentb6e2dcea65124673da047f9b3c92bc5e25980d63 (diff)
parent0b0da86f1f9d6f0b1a27b5e1e1658c42de9f356a (diff)
downloadmeshbay-317f09328ed8bf20148b707470c9b0fe82e59575.tar.gz
Merge branch 'docs/mediacenter-videos-app': Videos group app
Poster grid / flat list browsing, TMDB metadata enrichment, thumbnail generation and caching, season-specific overviews, manual match correction, and the create-group wizard's app-selection step. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LAmyXtc6dAADsH23ydXQpY
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/ui/app.py')
-rw-r--r--packages/meshbay-node/src/meshbay_node/ui/app.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/ui/app.py b/packages/meshbay-node/src/meshbay_node/ui/app.py
index d5b3f94..18764e8 100644
--- a/packages/meshbay-node/src/meshbay_node/ui/app.py
+++ b/packages/meshbay-node/src/meshbay_node/ui/app.py
@@ -20,7 +20,7 @@ import time
from html import escape
from pathlib import Path
-from fastapi import FastAPI, WebSocket, WebSocketDisconnect, Query
+from fastapi import FastAPI, HTTPException, WebSocket, WebSocketDisconnect, Query
from fastapi.responses import HTMLResponse, JSONResponse
from meshbay_node import __version__
@@ -361,6 +361,20 @@ def create_ui_app(state: dict) -> FastAPI:
state, group_id, bool(payload.get("allowed", False)),
))
+ # ── Enabled apps (operator only, localhost) ────────────────────────────
+ #
+ # Same loopback shape as member-upload: the Create Group wizard sets this
+ # once, right after creating the group and before the (potentially long)
+ # initial scan, so an operator narrowing this down to just Files+Videos
+ # never briefly has Chat live for other members to notice.
+
+ @app.put("/api/groups/{group_id}/apps")
+ async def set_enabled_apps(group_id: str, payload: dict):
+ apps = payload.get("apps")
+ if not isinstance(apps, list) or not apps:
+ raise HTTPException(400, "apps must be a non-empty list")
+ return await _op(lambda: ops.set_enabled_apps(state, group_id, apps))
+
# ── Scan settings (operator only, localhost) ──────────────────────────
@app.put("/api/groups/{group_id}/scan-settings")