Implement Melora: *arr media arrival webhook announcer for Matrix
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
This commit is contained in:
18
app/config.py
Normal file
18
app/config.py
Normal file
@@ -0,0 +1,18 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user