mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-04 23:17:20 +08:00
refactor: reorganize backend module boundaries
This commit is contained in:
+2
-2
@@ -1,12 +1,12 @@
|
||||
"""插件可用的缓存契约、适配器工厂和装饰器。"""
|
||||
|
||||
from app.infrastructure.cache import (
|
||||
from app.adapters.cache.backends import (
|
||||
AsyncFileBackend,
|
||||
AsyncRedisBackend,
|
||||
FileBackend,
|
||||
RedisBackend,
|
||||
)
|
||||
from app.platform.cache import (
|
||||
from app.runtime.cache import (
|
||||
AsyncCache,
|
||||
AsyncCacheBackend,
|
||||
AsyncFileCache,
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
"""插件可读取的宿主配置对象。"""
|
||||
|
||||
from app.platform.config import global_vars, settings
|
||||
from app.runtime.config import global_vars, settings
|
||||
|
||||
|
||||
__all__ = ["global_vars", "settings"]
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
"""插件事件订阅与发布接口。"""
|
||||
|
||||
from app.platform.events import Event, EventManager, eventmanager
|
||||
from app.runtime.events import Event, EventManager, eventmanager
|
||||
|
||||
|
||||
__all__ = ["Event", "EventManager", "eventmanager"]
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
"""插件可使用的稳定日志入口。"""
|
||||
|
||||
from app.platform.log import (
|
||||
from app.runtime.log import (
|
||||
CustomFormatter,
|
||||
LogConfigModel,
|
||||
LogEntry,
|
||||
|
||||
+8
-4
@@ -1,19 +1,23 @@
|
||||
"""插件常用的 HTTP、地址和站点处理工具。"""
|
||||
|
||||
from app.domain.site import SiteUtils
|
||||
from app.infrastructure.network import IpUtils
|
||||
from app.adapters.network.ip import IpUtils
|
||||
from app.foundation.url import UrlUtils
|
||||
from app.foundation.http import AsyncRequestUtils, RequestUtils
|
||||
from app.integrations.location import WebUtils
|
||||
from app.security.url import SecurityUtils
|
||||
from app.adapters.network.http import AsyncRequestUtils, RequestUtils
|
||||
from app.adapters.external.location import WebUtils
|
||||
from app.application.rss import RssHelper
|
||||
from app.application.security.url import SecurityUtils
|
||||
from app.application.site.sites import SitesHelper # pylint: disable=no-name-in-module
|
||||
|
||||
|
||||
__all__ = [
|
||||
"AsyncRequestUtils",
|
||||
"IpUtils",
|
||||
"RequestUtils",
|
||||
"RssHelper",
|
||||
"SecurityUtils",
|
||||
"SiteUtils",
|
||||
"SitesHelper",
|
||||
"UrlUtils",
|
||||
"WebUtils",
|
||||
]
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
"""插件和模块运行时管理接口。"""
|
||||
|
||||
from app.extensions.module_manager import ModuleManager
|
||||
from app.extensions.plugin_manager import PluginManager
|
||||
from app.runtime.extensions.module_manager import ModuleManager
|
||||
from app.runtime.extensions.plugin_manager import PluginManager
|
||||
|
||||
|
||||
__all__ = ["ModuleManager", "PluginManager"]
|
||||
|
||||
+7
-7
@@ -1,16 +1,16 @@
|
||||
"""插件可使用的宿主服务发现与运行时门面。"""
|
||||
|
||||
from app.extensions.service_registry import ServiceBaseHelper, ServiceConfigHelper
|
||||
from app.platform.runtime import SystemHelper
|
||||
from app.services.downloader import DownloaderHelper
|
||||
from app.services.filter import RuleHelper
|
||||
from app.services.mediaserver import (
|
||||
from app.runtime.extensions.service_registry import ServiceBaseHelper, ServiceConfigHelper
|
||||
from app.runtime.state import SystemHelper
|
||||
from app.application.downloader import DownloaderHelper
|
||||
from app.application.filter import RuleHelper
|
||||
from app.application.mediaserver import (
|
||||
MediaServerIdentityHelper,
|
||||
MediaServerHelper,
|
||||
MusicMediaServerHelper,
|
||||
)
|
||||
from app.services.storage import StorageHelper
|
||||
from app.services.notification import NotificationHelper
|
||||
from app.application.storage import StorageHelper
|
||||
from app.application.notification import NotificationHelper
|
||||
|
||||
|
||||
__all__ = [
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
from app.domain.string import StringUtils
|
||||
from app.foundation.crypto import CryptoJsUtils
|
||||
from app.foundation.dom import DomUtils
|
||||
from app.foundation.jieba import cut
|
||||
from app.foundation.object import ObjectUtils
|
||||
from app.foundation.text import cut
|
||||
from app.foundation.reflection import ObjectUtils
|
||||
from app.foundation.singleton import Singleton
|
||||
from app.infrastructure.system import SystemUtils
|
||||
from app.platform.execution import log_execution_time, retry
|
||||
from app.platform.localization import LocaleHelper
|
||||
from app.platform.scheduling import TimerUtils
|
||||
from app.security.otp import OtpUtils
|
||||
from app.adapters.system.host import SystemUtils
|
||||
from app.runtime.execution import log_execution_time, retry
|
||||
from app.runtime.localization import LocaleHelper
|
||||
from app.runtime.scheduling import TimerUtils
|
||||
from app.application.security.otp import OtpUtils
|
||||
|
||||
|
||||
decrypt = CryptoJsUtils.decrypt
|
||||
|
||||
Reference in New Issue
Block a user