feat: resolve chromecast discovery conflict and add CI/CD workflow
Build and Push Docker Image / build-and-push (push) Failing after 10m6s

- Update Zeroconf to unicast mode to resolve port 5353 conflict with avahi-daemon
- Make API and Streamlit ports configurable via environment variables (defaults: 8055, 8505)
- Add Gitea Actions workflow for automated Docker builds and registry pushes
- Refactor Chromecast discovery to use modern CastBrowser API
This commit is contained in:
pie
2026-05-03 17:19:26 +01:00
parent d0dba8183b
commit 067cc51cf2
8 changed files with 95 additions and 21 deletions
+3 -4
View File
@@ -5,7 +5,7 @@ from typing import List
import os
from .library import scan_library
from .cast_logic import cast_manager
from .utils import get_logger, VIDEOS_DIR, THUMBNAILS_DIR, get_host_ip
from .utils import get_logger, VIDEOS_DIR, THUMBNAILS_DIR, get_host_ip, API_PORT
logger = get_logger(__name__)
@@ -25,9 +25,8 @@ async def get_library():
@app.post("/cast")
async def start_casting(request: CastRequest, background_tasks: BackgroundTasks):
host_ip = get_host_ip()
# Port is 8000 by default for uvicorn in our setup
urls = [f"http://{host_ip}:8000/media/{path}" for path in request.video_paths]
urls = [f"http://{host_ip}:{API_PORT}/media/{path}" for path in request.video_paths]
logger.info(f"Received cast request for {len(urls)} videos")
cast_manager.play_queue(urls)
return {"status": "started", "queue_len": len(urls)}