refactor: route metadata module settings through runtime

This commit is contained in:
jxxghp
2026-08-23 03:01:29 +08:00
parent c5f0bd4fb7
commit 4641db7f5b
13 changed files with 44 additions and 32 deletions
+3 -1
View File
@@ -9,7 +9,9 @@ from pathlib import Path
from typing import Any, Optional, Tuple, Union
from uuid import UUID
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.runtime.log import logger
from app.modules import _ModuleBase
from app.schemas.types import ModuleType, OtherModulesType
+3 -1
View File
@@ -1,7 +1,9 @@
from typing import List, Optional, Tuple, Union
from app.schemas.context import MediaPerson as _SchemaMediaPerson
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.domain.context import MediaInfo
from app.domain.meta.metabase import MetaBase
from app.domain.scraper import MediaScraperHelper
+3 -1
View File
@@ -2,7 +2,9 @@ from datetime import date
from typing import Optional
from app.runtime.cache import cached
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.runtime.log import logger
from app.adapters.network.http import AsyncRequestUtils, RequestUtils
+3 -1
View File
@@ -2,7 +2,9 @@ from dataclasses import dataclass
from typing import Any, List, Optional, Tuple, Union
from app.schemas.context import MediaPerson as _SchemaMediaPerson
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.domain.context import MediaInfo
from app.domain.meta.metabase import MetaBase
from app.domain.scraper import MediaScraperHelper
+3 -1
View File
@@ -4,7 +4,9 @@ from typing import Optional
import requests
from app.runtime.cache import cached
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.adapters.network.http import RequestUtils, AsyncRequestUtils
+3 -1
View File
@@ -4,7 +4,9 @@ from typing import Any, List, Optional, Tuple, Union
import cn2an
from app.schemas.context import MediaPerson as _SchemaMediaPerson
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.domain.context import (
MediaInfo,
MusicAlbumInfo,
+3 -1
View File
@@ -13,7 +13,9 @@ import requests
from bs4 import BeautifulSoup
from app.runtime.cache import cached
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.adapters.network.http import RequestUtils, AsyncRequestUtils
from app.foundation.singleton import WeakSingleton
+3 -1
View File
@@ -4,7 +4,9 @@ from typing import Optional, Tuple, Union
from app.runtime.cache import cached
from app.domain.context import MediaInfo
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.runtime.log import logger
from app.modules import _ModuleBase
from app.schemas.types import MediaType, ModuleType, OtherModulesType
+3 -1
View File
@@ -11,7 +11,9 @@ from app.domain.meta.metabase import MetaBase
from app.domain.scraper import MediaScraperHelper
from app.foundation.text import convert as zhconv_convert
from app.modules import _ModuleBase
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.runtime.log import logger
from app.schemas.context import MediaCredit, MediaImageSet
from app.schemas.media import normalize_media_source
+3 -1
View File
@@ -9,7 +9,9 @@ from pydantic import BaseModel, ConfigDict, Field, ValidationError
from app.adapters.network.http import AsyncRequestUtils, RequestUtils
from app.runtime.cache import cached
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.runtime.log import logger
TModel = TypeVar("TModel", bound=BaseModel)