refactor backend module architecture

This commit is contained in:
jxxghp
2026-08-14 15:45:38 +08:00
parent 557cc0e2e3
commit 7b3444c366
716 changed files with 10378 additions and 7709 deletions
+9 -8
View File
@@ -7,16 +7,17 @@ from typing import Any, Iterable, Optional, Tuple, Union
from requests import Session
from app.core.cache import cached
from app.core.config import settings
from app.core.context import (
from app.platform.cache import cached
from app.platform.config import settings
from app.domain.context import (
MusicAlbumInfo,
MusicArtistInfo,
MusicInfo,
MusicRelease,
)
from app.core.meta import MetaBase, MetaMusic
from app.log import logger
from app.domain.meta.metabase import MetaBase
from app.domain.meta.metamusic import MetaMusic
from app.platform.log import logger
from app.modules import _ModuleBase
from app.modules.musicbrainz.music_cache import MusicBrainzCache
from app.schemas.types import (
@@ -28,9 +29,9 @@ from app.schemas.types import (
MediaType,
ModuleType,
)
from app.utils.http import AsyncRequestUtils, RequestUtils
from app.utils.media import is_media_source_selected
from app.utils.zhconv import convert as zhconv_convert
from app.foundation.http import AsyncRequestUtils, RequestUtils
from app.domain.media import is_media_source_selected
from app.foundation.zhconv import convert as zhconv_convert
class MusicBrainzModule(_ModuleBase):
+6 -6
View File
@@ -5,13 +5,13 @@ from threading import RLock
from time import time
from typing import Optional
from app.core.cache import FileCache, TTLCache
from app.core.config import settings
from app.core.context import MusicInfo
from app.core.meta import MetaMusic
from app.log import logger
from app.platform.cache import FileCache, TTLCache
from app.platform.config import settings
from app.domain.context import MusicInfo
from app.domain.meta.metamusic import MetaMusic
from app.platform.log import logger
from app.schemas.types import MUSIC_ENTITY_RECORDING
from app.utils.singleton import WeakSingleton
from app.foundation.singleton import WeakSingleton
lock = RLock()
PERSISTENCE_VERSION = 1