mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-03 14:37:36 +08:00
refactor: route chat and subtitle settings through runtime
This commit is contained in:
@@ -12,7 +12,9 @@ from typing import Optional, List, Tuple
|
||||
from PIL import Image
|
||||
|
||||
from app.runtime.cache import FileCache
|
||||
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
|
||||
|
||||
@@ -4,7 +4,9 @@ from urllib.parse import urljoin, urlparse
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from app.runtime.config import settings
|
||||
from app.runtime.settings import RuntimeSettingsCompat
|
||||
|
||||
settings = RuntimeSettingsCompat()
|
||||
from app.domain.context import Context
|
||||
from app.application.site.query import get_configured_site_query_service
|
||||
from app.application.site.sites import SitesHelper # pylint: disable=import-error,no-name-in-module
|
||||
|
||||
@@ -36,7 +36,9 @@ try:
|
||||
except ImportError:
|
||||
from telegramify_markdown.type import ContentTypes, File, Photo, Text # noqa: E402
|
||||
|
||||
from app.runtime.config import settings # noqa: E402
|
||||
from app.runtime.settings import RuntimeSettingsCompat # noqa: E402
|
||||
|
||||
settings = RuntimeSettingsCompat()
|
||||
from app.domain.context import MediaInfo, Context # noqa: E402
|
||||
from app.domain.metainfo import MetaInfo # noqa: E402
|
||||
from app.application.image import ImageHelper # noqa: E402
|
||||
|
||||
@@ -12,7 +12,9 @@ import websocket
|
||||
from Crypto.Cipher import AES
|
||||
|
||||
from app.runtime.cache import FileCache
|
||||
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.application.messaging.agent import matches_channel_admin
|
||||
|
||||
@@ -17,7 +17,9 @@ from Crypto.Cipher import AES
|
||||
from Crypto.Util.Padding import pad
|
||||
|
||||
from app.runtime.cache import FileCache
|
||||
from app.runtime.config import settings
|
||||
from app.runtime.settings import RuntimeSettingsCompat
|
||||
|
||||
settings = RuntimeSettingsCompat()
|
||||
from app.domain.context import Context, MediaInfo
|
||||
from app.domain.metainfo import MetaInfo
|
||||
from app.runtime.log import logger
|
||||
|
||||
@@ -1066,6 +1066,8 @@ Emby、Jellyfin、Feishu、Discord 与 Slack 模块切换到动态运行时配
|
||||
存储公开方法;配置债务由 57 个文件降至 50 个,文件管理与存储专项测试通过。
|
||||
Indexer parser/spider 模块族切换到动态运行时配置,站点搜索 URL、解析与分类行为保持;配置债务由 50 个文件
|
||||
降至 39 个,Indexer 专项测试通过。
|
||||
QQ、Telegram、WeChat、WeChatClawBot 与字幕模块切换到动态运行时配置,消息回调、代理和字幕下载行为保持;
|
||||
配置债务由 39 个文件降至 34 个,消息与字幕专项测试通过。
|
||||
|
||||
同日修正适配器配置下沉边界:OCR、CookieCloud、DoH、Rust 和资源签名等低层实现不再直接依赖
|
||||
`app.application`,由 `app.runtime.settings` 端口承接组合根注入;未启动装配时仍回退旧 Settings ABI,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"root": "app"
|
||||
},
|
||||
"settings_imports": {
|
||||
"count": 39,
|
||||
"count": 34,
|
||||
"files": [
|
||||
"app/adapters/system/fsproxy.py",
|
||||
"app/cli.py",
|
||||
@@ -23,11 +23,8 @@
|
||||
"app/modules/filemanager/storages/local.py",
|
||||
"app/modules/postgresql/__init__.py",
|
||||
"app/modules/qbittorrent/__init__.py",
|
||||
"app/modules/qqbot/qqbot.py",
|
||||
"app/modules/redis/__init__.py",
|
||||
"app/modules/rtorrent/__init__.py",
|
||||
"app/modules/subtitle/__init__.py",
|
||||
"app/modules/telegram/telegram.py",
|
||||
"app/modules/themoviedb/__init__.py",
|
||||
"app/modules/themoviedb/category.py",
|
||||
"app/modules/themoviedb/scraper.py",
|
||||
@@ -40,8 +37,6 @@
|
||||
"app/modules/transmission/__init__.py",
|
||||
"app/modules/trimemedia/api.py",
|
||||
"app/modules/webpush/__init__.py",
|
||||
"app/modules/wechat/wechatbot.py",
|
||||
"app/modules/wechatclawbot/wechatclawbot.py",
|
||||
"app/runtime/extensions/host_module_adapter.py",
|
||||
"app/startup/agent_initializer.py",
|
||||
"app/startup/database.py",
|
||||
|
||||
+6
-6
@@ -14,7 +14,7 @@
|
||||
"workflow_to_db": []
|
||||
},
|
||||
"edge_count": 6425,
|
||||
"edge_sha256": "06fb9c478770d0a27b22f8bcde92644fc5a2b14775446953716b4ed492b32042",
|
||||
"edge_sha256": "41afc9f5275b7f406e8ab4dd240d9af5bd01dd2e7537431e221558db2b9e593e",
|
||||
"edges": [
|
||||
"app -> app.runtime",
|
||||
"app -> app.runtime.compat",
|
||||
@@ -4797,8 +4797,8 @@
|
||||
"app.modules.qqbot.qqbot -> app.modules.qqbot.gateway",
|
||||
"app.modules.qqbot.qqbot -> app.runtime",
|
||||
"app.modules.qqbot.qqbot -> app.runtime.cache",
|
||||
"app.modules.qqbot.qqbot -> app.runtime.config",
|
||||
"app.modules.qqbot.qqbot -> app.runtime.log",
|
||||
"app.modules.qqbot.qqbot -> app.runtime.settings",
|
||||
"app.modules.redis -> app.adapters",
|
||||
"app.modules.redis -> app.adapters.cache",
|
||||
"app.modules.redis -> app.adapters.cache.redis",
|
||||
@@ -4861,8 +4861,8 @@
|
||||
"app.modules.subtitle -> app.domain.context",
|
||||
"app.modules.subtitle -> app.modules",
|
||||
"app.modules.subtitle -> app.runtime",
|
||||
"app.modules.subtitle -> app.runtime.config",
|
||||
"app.modules.subtitle -> app.runtime.log",
|
||||
"app.modules.subtitle -> app.runtime.settings",
|
||||
"app.modules.subtitle -> app.schemas",
|
||||
"app.modules.subtitle -> app.schemas.types",
|
||||
"app.modules.synologychat -> app.adapters",
|
||||
@@ -4923,9 +4923,9 @@
|
||||
"app.modules.telegram.telegram -> app.modules.telegram",
|
||||
"app.modules.telegram.telegram -> app.modules.telegram.compat",
|
||||
"app.modules.telegram.telegram -> app.runtime",
|
||||
"app.modules.telegram.telegram -> app.runtime.config",
|
||||
"app.modules.telegram.telegram -> app.runtime.execution",
|
||||
"app.modules.telegram.telegram -> app.runtime.log",
|
||||
"app.modules.telegram.telegram -> app.runtime.settings",
|
||||
"app.modules.telegram.telegram -> app.runtime.thread",
|
||||
"app.modules.theaudiodb -> app.adapters",
|
||||
"app.modules.theaudiodb -> app.adapters.network",
|
||||
@@ -5322,8 +5322,8 @@
|
||||
"app.modules.wechat.wechatbot -> app.foundation.size",
|
||||
"app.modules.wechat.wechatbot -> app.runtime",
|
||||
"app.modules.wechat.wechatbot -> app.runtime.cache",
|
||||
"app.modules.wechat.wechatbot -> app.runtime.config",
|
||||
"app.modules.wechat.wechatbot -> app.runtime.log",
|
||||
"app.modules.wechat.wechatbot -> app.runtime.settings",
|
||||
"app.modules.wechat.wechatbot -> app.schemas",
|
||||
"app.modules.wechat.wechatbot -> app.schemas.message",
|
||||
"app.modules.wechat.wechatbot -> app.schemas.types",
|
||||
@@ -5351,8 +5351,8 @@
|
||||
"app.modules.wechatclawbot.wechatclawbot -> app.foundation.size",
|
||||
"app.modules.wechatclawbot.wechatclawbot -> app.runtime",
|
||||
"app.modules.wechatclawbot.wechatclawbot -> app.runtime.cache",
|
||||
"app.modules.wechatclawbot.wechatclawbot -> app.runtime.config",
|
||||
"app.modules.wechatclawbot.wechatclawbot -> app.runtime.log",
|
||||
"app.modules.wechatclawbot.wechatclawbot -> app.runtime.settings",
|
||||
"app.modules.zspace -> app.modules",
|
||||
"app.modules.zspace -> app.modules._base",
|
||||
"app.modules.zspace -> app.modules.zspace.zspace",
|
||||
|
||||
Reference in New Issue
Block a user