refactor: route media and chat module settings through runtime

This commit is contained in:
jxxghp
2026-08-23 03:09:59 +08:00
parent 4098cc1eec
commit ac32adc7b6
8 changed files with 24 additions and 17 deletions
+3 -1
View File
@@ -9,7 +9,9 @@ import discord
from discord import app_commands
import httpx
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.domain.context import MediaInfo, Context
from app.domain.metainfo import MetaInfo
from app.runtime.log import logger
+3 -1
View File
@@ -14,7 +14,9 @@ from app.schemas.mediaserver import MediaServerLibrary as _SchemaMediaServerLibr
from app.schemas.mediaserver import MediaServerPlayItem as _SchemaMediaServerPlayItem
from app.schemas.mediaserver import RefreshMediaItem as _SchemaRefreshMediaItem
from app.schemas.mediaserver import WebhookEventInfo as _SchemaWebhookEventInfo
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.application.mediaserver import MediaServerIdentityHelper, MusicMediaServerHelper
from app.runtime.log import logger
from app.schemas.mediaserver import MediaServerItem
+3 -1
View File
@@ -50,7 +50,9 @@ from lark_oapi.event.callback.model.p2_card_action_trigger import (
P2CardActionTriggerResponse,
)
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.domain.context import Context, MediaInfo
from app.application.security.user import get_configured_user_channel_lookup
from app.application.messaging.agent import matches_channel_admin
+3 -1
View File
@@ -11,7 +11,9 @@ from app.schemas.mediaserver import MediaServerItemUserState as _SchemaMediaServ
from app.schemas.mediaserver import MediaServerLibrary as _SchemaMediaServerLibrary
from app.schemas.mediaserver import MediaServerPlayItem as _SchemaMediaServerPlayItem
from app.schemas.mediaserver import WebhookEventInfo as _SchemaWebhookEventInfo
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.application.mediaserver import MediaServerIdentityHelper, MusicMediaServerHelper
from app.runtime.log import logger
from app.schemas.types import MediaType
+3 -1
View File
@@ -10,7 +10,9 @@ from slack_bolt import App
from slack_bolt.adapter.socket_mode import SocketModeHandler
from slack_sdk import WebClient
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.domain.context import MediaInfo, Context
from app.domain.metainfo import MetaInfo
from app.runtime.log import logger