Replace Bellhop scaffolding with full Melora implementation: - FastAPI webhook endpoints for Radarr, Sonarr, and Lidarr - matrix-nio integration with threaded room posting - SQLite for thread root persistence and event deduplication - Message formatting with plain text and HTML for each media type - Shared secret authentication via X-Arr-Webhook-Secret header - Updated dependencies, configuration, and documentation https://claude.ai/code/session_01DuzWyMMXvLMB4VxEwJyV4X
19 lines
492 B
Python
19 lines
492 B
Python
import os
|
|
from dotenv import load_dotenv
|
|
|
|
load_dotenv()
|
|
|
|
|
|
class Config:
|
|
MATRIX_HOMESERVER_URL: str = os.environ["MATRIX_HOMESERVER_URL"]
|
|
MATRIX_BOT_USER_ID: str = os.environ["MATRIX_BOT_USER_ID"]
|
|
MATRIX_BOT_ACCESS_TOKEN: str = os.environ["MATRIX_BOT_ACCESS_TOKEN"]
|
|
MATRIX_ARRIVALS_ROOM_ID: str = os.environ["MATRIX_ARRIVALS_ROOM_ID"]
|
|
|
|
WEBHOOK_SECRET: str = os.environ["WEBHOOK_SECRET"]
|
|
|
|
DATABASE_PATH: str = os.getenv("DATABASE_PATH", "melora.db")
|
|
|
|
|
|
config = Config()
|