Files
gronod 7bcf5322e1 feat: emby-mcp 1.0.16 player owner filter and HA links
Expose session/last-used user and device IP on player rows. Filter
retrieve_player_list by users, merge GET /Devices when include_offline
is set, and resolve spoken names to HA media_player entities via
player_links (device_id or IP). PlayNow still requires a live session.
2026-09-25 19:58:58 +00:00

38 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/with-contenv bashio
set -euo pipefail
bashio::log.info "Starting Emby MCP..."
export EMBY_SERVER_URL="$(bashio::config 'emby_server_url')"
export EMBY_USERNAME="$(bashio::config 'emby_username')"
export EMBY_PASSWORD="$(bashio::config 'emby_password')"
export EMBY_API_KEY="$(bashio::config 'emby_api_key')"
export EMBY_USER_ID="$(bashio::config 'emby_user_id')"
export EMBY_VERIFY_SSL="$(bashio::config 'emby_verify_ssl')"
export LLM_MAX_ITEMS="$(bashio::config 'llm_max_items')"
export MCP_TRANSPORT="$(bashio::config 'mcp_transport')"
export MCP_LISTEN_ADDR="$(bashio::config 'mcp_listen_addr')"
export MCP_SESSION_TIMEOUT="$(bashio::config 'mcp_session_timeout')"
export LOG_LEVEL="$(bashio::config 'log_level')"
export DEBUG_REST="false"
export DEBUG_MCP="false"
export DEBUG_EMBY="false"
if bashio::config.exists 'debug.rest' && bashio::config.true 'debug.rest'; then export DEBUG_REST="true"; fi
if bashio::config.exists 'debug.mcp' && bashio::config.true 'debug.mcp'; then export DEBUG_MCP="true"; fi
if bashio::config.exists 'debug.emby' && bashio::config.true 'debug.emby'; then export DEBUG_EMBY="true"; fi
if bashio::config.true 'restrict_to_localhost'; then
export MCP_RESTRICT_LOCALHOST="true"
bashio::log.info "restrict_to_localhost is on — binding loopback only"
else
export MCP_RESTRICT_LOCALHOST="false"
fi
if [ -f /data/options.json ]; then
export PLAYER_USERS="$(jq -c '.player_users // []' /data/options.json)"
export PLAYER_LINKS="$(jq -c '.player_links // []' /data/options.json)"
fi
exec /emby-mcp