mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
refactor: expand chain runtime config snapshot
This commit is contained in:
@@ -19,7 +19,6 @@ from app.domain import title as title_rules
|
||||
from app.domain.context import Context, MediaInfo
|
||||
from app.domain.meta.metabase import MetaBase
|
||||
from app.foundation import url as url_tools
|
||||
from app.runtime.config import settings
|
||||
from app.runtime.log import logger
|
||||
from app.schemas.download import DownloadDirectory
|
||||
from app.schemas.file import FileURI
|
||||
@@ -1130,7 +1129,7 @@ class MediaInteractionChain(ChainBase):
|
||||
source=source,
|
||||
title=title,
|
||||
userid=userid,
|
||||
link=settings.MP_DOMAIN("#/resource"),
|
||||
link=self.runtime_config.resource_url,
|
||||
buttons=buttons,
|
||||
original_message_id=original_message_id,
|
||||
original_chat_id=original_chat_id,
|
||||
@@ -1533,12 +1532,11 @@ class MediaInteractionChain(ChainBase):
|
||||
for sea, no_exist in season_map.items()
|
||||
]
|
||||
|
||||
@staticmethod
|
||||
def _should_auto_download(userid: Union[str, int]) -> bool:
|
||||
def _should_auto_download(self, userid: Union[str, int]) -> bool:
|
||||
"""
|
||||
判断当前用户是否命中自动下载名单。
|
||||
"""
|
||||
auto_download_user = settings.AUTO_DOWNLOAD_USER
|
||||
auto_download_user = self.runtime_config.auto_download_user
|
||||
return bool(
|
||||
auto_download_user
|
||||
and (
|
||||
|
||||
Reference in New Issue
Block a user