From c55046c708c020b4605c61cc9f3833801715a6da Mon Sep 17 00:00:00 2001 From: Xevion Date: Sun, 1 Jun 2025 00:55:34 -0500 Subject: [PATCH] reformat, remove sonarr event hook --- hooks.py | 4 ---- main.py | 2 -- sonarr.py | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/hooks.py b/hooks.py index cf45087..5bf27d5 100644 --- a/hooks.py +++ b/hooks.py @@ -11,8 +11,4 @@ async def add_sonarr_api_key(request: httpx.Request) -> None: Event hook to inject the Sonarr API key into requests to the Sonarr domain and /api path. """ if SONARR_URL and request.url.host in SONARR_URL and "/api" in request.url.path: - await logger.debug( - "applying sonarr api key", - sonarr_url=SONARR_URL, - ) request.headers["X-Api-Key"] = SONARR_API_KEY diff --git a/main.py b/main.py index d4b1711..74b33a5 100644 --- a/main.py +++ b/main.py @@ -4,8 +4,6 @@ from collections import defaultdict from typing import Dict import structlog -import httpx -import asyncio from auth import authelia_login from config import get_async_logger diff --git a/sonarr.py b/sonarr.py index 4cb93b0..97aaf0c 100644 --- a/sonarr.py +++ b/sonarr.py @@ -1,6 +1,6 @@ import httpx -from config import SONARR_URL, SONARR_API_KEY, logger +from config import SONARR_API_KEY, SONARR_URL, logger # Add a global semaphore for concurrency limiting semaphore = None