mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-29 03:56:43 +08:00
refactor: route music module settings through runtime
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
from typing import Any, Optional, Tuple, Union
|
||||
|
||||
from app.runtime.cache import cached
|
||||
from app.runtime.config import settings
|
||||
from app.runtime.settings import RuntimeSettingsCompat
|
||||
|
||||
settings = RuntimeSettingsCompat()
|
||||
from app.domain.context import MusicInfo
|
||||
from app.runtime.log import logger
|
||||
from app.modules import _ModuleBase
|
||||
|
||||
@@ -4,7 +4,9 @@ import time
|
||||
from typing import Any, Optional, Tuple, Union
|
||||
|
||||
from app.runtime.cache import cached
|
||||
from app.runtime.config import settings
|
||||
from app.runtime.settings import RuntimeSettingsCompat
|
||||
|
||||
settings = RuntimeSettingsCompat()
|
||||
from app.domain.context import MusicInfo, MusicLyrics
|
||||
from app.domain.meta.metamusic import MetaMusic
|
||||
from app.runtime.log import logger
|
||||
|
||||
@@ -8,7 +8,9 @@ from typing import Any, Iterable, Optional, Tuple, Union
|
||||
from requests import Session
|
||||
|
||||
from app.runtime.cache import cached
|
||||
from app.runtime.config import settings
|
||||
from app.runtime.settings import RuntimeSettingsCompat
|
||||
|
||||
settings = RuntimeSettingsCompat()
|
||||
from app.domain.context import (
|
||||
MusicAlbumInfo,
|
||||
MusicArtistInfo,
|
||||
|
||||
@@ -6,7 +6,9 @@ from time import time
|
||||
from typing import Optional
|
||||
|
||||
from app.runtime.cache import FileCache, TTLCache
|
||||
from app.runtime.config import settings
|
||||
from app.runtime.settings import RuntimeSettingsCompat
|
||||
|
||||
settings = RuntimeSettingsCompat()
|
||||
from app.domain.context import MusicInfo
|
||||
from app.domain.meta.metamusic import MetaMusic
|
||||
from app.runtime.log import logger
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
from typing import Any, Optional, Tuple, Union
|
||||
|
||||
from app.runtime.cache import cached
|
||||
from app.runtime.config import settings
|
||||
from app.runtime.settings import RuntimeSettingsCompat
|
||||
|
||||
settings = RuntimeSettingsCompat()
|
||||
from app.domain.context import (
|
||||
MusicAlbumInfo,
|
||||
MusicArtistInfo,
|
||||
|
||||
@@ -1058,6 +1058,8 @@ Agent 下载、任务、媒体识别、刮削和 Web 搜索工具也切换到动
|
||||
配置债务由 84 个文件降至 77 个,Agent 任务、搜索与识别专项测试通过。
|
||||
AcoustID、AniList、Bangumi、Douban、Fanart 和 IMDb 模块族改用动态运行时端口,模块公开类与配置热读保持;
|
||||
配置债务由 77 个文件降至 67 个,相关识别、浏览与刮削专项测试通过。
|
||||
MusicBrainz、ListenBrainz、LrcLib 与 TheAudioDB 模块族也完成同样迁移,配置债务由 67 个文件降至 62 个,
|
||||
音乐元数据专项测试通过。
|
||||
|
||||
同日修正适配器配置下沉边界:OCR、CookieCloud、DoH、Rust 和资源签名等低层实现不再直接依赖
|
||||
`app.application`,由 `app.runtime.settings` 端口承接组合根注入;未启动装配时仍回退旧 Settings ABI,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"root": "app"
|
||||
},
|
||||
"settings_imports": {
|
||||
"count": 67,
|
||||
"count": 62,
|
||||
"files": [
|
||||
"app/adapters/system/fsproxy.py",
|
||||
"app/cli.py",
|
||||
@@ -43,10 +43,6 @@
|
||||
"app/modules/indexer/spider/torrentleech.py",
|
||||
"app/modules/indexer/spider/yema.py",
|
||||
"app/modules/jellyfin/jellyfin.py",
|
||||
"app/modules/listenbrainz/__init__.py",
|
||||
"app/modules/lrclib/__init__.py",
|
||||
"app/modules/musicbrainz/__init__.py",
|
||||
"app/modules/musicbrainz/music_cache.py",
|
||||
"app/modules/postgresql/__init__.py",
|
||||
"app/modules/qbittorrent/__init__.py",
|
||||
"app/modules/qqbot/qqbot.py",
|
||||
@@ -55,7 +51,6 @@
|
||||
"app/modules/slack/slack.py",
|
||||
"app/modules/subtitle/__init__.py",
|
||||
"app/modules/telegram/telegram.py",
|
||||
"app/modules/theaudiodb/__init__.py",
|
||||
"app/modules/themoviedb/__init__.py",
|
||||
"app/modules/themoviedb/category.py",
|
||||
"app/modules/themoviedb/scraper.py",
|
||||
|
||||
+6
-6
@@ -14,7 +14,7 @@
|
||||
"workflow_to_db": []
|
||||
},
|
||||
"edge_count": 6421,
|
||||
"edge_sha256": "a5ef71ffebe71367bde1689ab0889db037c83cea53b85ee12ad0a79aa006f231",
|
||||
"edge_sha256": "6b9946cab961b8c499aad349218832c54c0b581f86ba8dbd992d538534a0322f",
|
||||
"edges": [
|
||||
"app -> app.runtime",
|
||||
"app -> app.runtime.compat",
|
||||
@@ -4622,8 +4622,8 @@
|
||||
"app.modules.listenbrainz -> app.modules",
|
||||
"app.modules.listenbrainz -> app.runtime",
|
||||
"app.modules.listenbrainz -> app.runtime.cache",
|
||||
"app.modules.listenbrainz -> app.runtime.config",
|
||||
"app.modules.listenbrainz -> app.runtime.log",
|
||||
"app.modules.listenbrainz -> app.runtime.settings",
|
||||
"app.modules.listenbrainz -> app.schemas",
|
||||
"app.modules.listenbrainz -> app.schemas.types",
|
||||
"app.modules.lrclib -> app.adapters",
|
||||
@@ -4636,8 +4636,8 @@
|
||||
"app.modules.lrclib -> app.modules",
|
||||
"app.modules.lrclib -> app.runtime",
|
||||
"app.modules.lrclib -> app.runtime.cache",
|
||||
"app.modules.lrclib -> app.runtime.config",
|
||||
"app.modules.lrclib -> app.runtime.log",
|
||||
"app.modules.lrclib -> app.runtime.settings",
|
||||
"app.modules.lrclib -> app.schemas",
|
||||
"app.modules.lrclib -> app.schemas.types",
|
||||
"app.modules.musicbrainz -> app.adapters",
|
||||
@@ -4655,8 +4655,8 @@
|
||||
"app.modules.musicbrainz -> app.modules.musicbrainz.music_cache",
|
||||
"app.modules.musicbrainz -> app.runtime",
|
||||
"app.modules.musicbrainz -> app.runtime.cache",
|
||||
"app.modules.musicbrainz -> app.runtime.config",
|
||||
"app.modules.musicbrainz -> app.runtime.log",
|
||||
"app.modules.musicbrainz -> app.runtime.settings",
|
||||
"app.modules.musicbrainz -> app.schemas",
|
||||
"app.modules.musicbrainz -> app.schemas.types",
|
||||
"app.modules.musicbrainz.music_cache -> app.domain",
|
||||
@@ -4667,8 +4667,8 @@
|
||||
"app.modules.musicbrainz.music_cache -> app.foundation.singleton",
|
||||
"app.modules.musicbrainz.music_cache -> app.runtime",
|
||||
"app.modules.musicbrainz.music_cache -> app.runtime.cache",
|
||||
"app.modules.musicbrainz.music_cache -> app.runtime.config",
|
||||
"app.modules.musicbrainz.music_cache -> app.runtime.log",
|
||||
"app.modules.musicbrainz.music_cache -> app.runtime.settings",
|
||||
"app.modules.musicbrainz.music_cache -> app.schemas",
|
||||
"app.modules.musicbrainz.music_cache -> app.schemas.types",
|
||||
"app.modules.navidrome -> app.application",
|
||||
@@ -4935,8 +4935,8 @@
|
||||
"app.modules.theaudiodb -> app.modules",
|
||||
"app.modules.theaudiodb -> app.runtime",
|
||||
"app.modules.theaudiodb -> app.runtime.cache",
|
||||
"app.modules.theaudiodb -> app.runtime.config",
|
||||
"app.modules.theaudiodb -> app.runtime.log",
|
||||
"app.modules.theaudiodb -> app.runtime.settings",
|
||||
"app.modules.theaudiodb -> app.schemas",
|
||||
"app.modules.theaudiodb -> app.schemas.types",
|
||||
"app.modules.themoviedb -> app.adapters",
|
||||
|
||||
Reference in New Issue
Block a user