reformat, remove sonarr event hook

This commit is contained in:
2025-06-01 00:55:34 -05:00
parent 0486a814e1
commit c55046c708
3 changed files with 1 additions and 7 deletions

View File

@@ -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. 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: 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 request.headers["X-Api-Key"] = SONARR_API_KEY

View File

@@ -4,8 +4,6 @@ from collections import defaultdict
from typing import Dict from typing import Dict
import structlog import structlog
import httpx
import asyncio
from auth import authelia_login from auth import authelia_login
from config import get_async_logger from config import get_async_logger

View File

@@ -1,6 +1,6 @@
import httpx 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 # Add a global semaphore for concurrency limiting
semaphore = None semaphore = None