mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-11-06 07:09:09 +08:00
123 lines
5.6 KiB
Python
123 lines
5.6 KiB
Python
"""
|
|
SearchChain 各职责组件的静态组合契约。
|
|
"""
|
|
|
|
from typing import TYPE_CHECKING, Any, Awaitable, Callable
|
|
|
|
from app.chain.base import ChainBase
|
|
|
|
if TYPE_CHECKING:
|
|
from app.domain.context import Context
|
|
|
|
class _SearchOwnerBase(ChainBase):
|
|
"""
|
|
向类型检查器声明稳定门面中各职责组件共用的能力。
|
|
"""
|
|
|
|
_AI_INDICES_CACHE_KEY: str
|
|
_RESULT_CACHE_KEY: str
|
|
_SEARCH_PARAMS_CACHE_KEY: str
|
|
_SUBTITLE_RESULT_CACHE_KEY: str
|
|
_SearchChain__async_search_all_sites: Callable[..., Any]
|
|
_SearchChain__async_search_all_sites_stream: Callable[..., Any]
|
|
_SearchChain__search_all_sites: Callable[..., Any]
|
|
_async_process_music: Callable[..., Any]
|
|
_async_process_music_stream: Callable[..., Any]
|
|
_async_indexers: Callable[..., Any]
|
|
_async_save_results: Callable[..., Any]
|
|
_async_save_subtitles: Callable[..., Any]
|
|
_async_search_all_sites: Callable[..., Any]
|
|
_async_search_all_sites_stream: Callable[..., Any]
|
|
_async_search_subtitles_all_sites: Callable[..., Any]
|
|
_async_search_subtitles_all_sites_stream: Callable[..., Any]
|
|
_async_search_subtitles_for_media: Callable[..., Any]
|
|
_async_search_subtitles_for_media_stream: Callable[..., Any]
|
|
_build_ai_recommend_status: Callable[..., Any]
|
|
_build_music_contexts: Callable[..., Any]
|
|
_build_search_keyword: Callable[..., Any]
|
|
_build_search_pages: Callable[..., Any]
|
|
_build_subtitle_meta: Callable[..., Any]
|
|
_build_subtitle_names: Callable[..., Any]
|
|
_build_subtitle_season_episodes: Callable[..., Any]
|
|
_build_subtitle_torrent: Callable[..., Any]
|
|
_build_title_search_meta: Callable[..., Any]
|
|
_calculate_recommend_request_hash: Callable[..., Any]
|
|
_copy_media_input: Callable[..., Any]
|
|
_extract_recommend_items: Callable[..., Any]
|
|
_filter_title_search_torrents: Callable[..., Any]
|
|
_get_search_resource_pages: Callable[..., Any]
|
|
_invoke_recommend_llm: Callable[..., Any]
|
|
_iter_site_page_results: Callable[..., Any]
|
|
_iter_provider_batches: Callable[..., Any]
|
|
_iter_provider_events: Callable[..., Any]
|
|
_iter_subtitle_events: Callable[..., Any]
|
|
_iter_torrent_events: Callable[..., Any]
|
|
_match_subtitle_episode: Callable[..., Any]
|
|
_matching_music_torrents: Callable[..., Any]
|
|
_media_recognize_kwargs: Callable[..., Any]
|
|
_normalize_ai_indices: Callable[..., Any]
|
|
_normalize_music_match_text: Callable[..., Any]
|
|
_normalize_search_params: Callable[..., Any]
|
|
_parse_result: Callable[..., list[Context]]
|
|
_parse_subtitle_result: Callable[..., Any]
|
|
_prepare_params: Callable[..., Any]
|
|
_process_music: Callable[..., Any]
|
|
_remove_duplicate: Callable[..., Any]
|
|
_remove_duplicate_subtitles: Callable[..., Any]
|
|
_remove_site: Callable[..., Any]
|
|
_restore_original_indices: Callable[..., Any]
|
|
_save_results: Callable[..., Any]
|
|
_search_all_sites: Callable[..., Any]
|
|
_search_site_torrents_with_budget: Callable[..., Any]
|
|
_search_state: Callable[..., Any]
|
|
_select_indexers: Callable[..., Any]
|
|
_selected_site_ids: Callable[..., Any]
|
|
_should_continue_search_pages: Callable[..., Any]
|
|
_should_continue_subtitle_search_pages: Callable[..., Any]
|
|
_stringify_sites: Callable[..., Any]
|
|
_sync_indexers: Callable[..., Any]
|
|
_torrent_keyword: Callable[..., Any]
|
|
_torrent_type: Callable[..., Any]
|
|
_unique_music_texts: Callable[..., Any]
|
|
async_last_search_params: Callable[..., Any]
|
|
async_last_search_context: Callable[..., Any]
|
|
async_save_search_context: Callable[..., Any]
|
|
async_last_search_results: Callable[..., Any]
|
|
async_last_subtitle_search_results: Callable[..., Any]
|
|
async_process: Callable[..., Awaitable[list[Context]]]
|
|
async_process_stream: Callable[..., Any]
|
|
async_save_last_search_params: Callable[..., Any]
|
|
async_search_by_id: Callable[..., Any]
|
|
async_search_by_id_stream: Callable[..., Any]
|
|
async_search_by_title: Callable[..., Any]
|
|
async_search_by_title_stream: Callable[..., Any]
|
|
async_search_subtitles_by_id: Callable[..., Any]
|
|
async_search_subtitles_by_id_stream: Callable[..., Any]
|
|
async_search_subtitles_by_title: Callable[..., Any]
|
|
async_search_subtitles_by_title_stream: Callable[..., Any]
|
|
cancel_ai_recommend: Callable[..., Any]
|
|
get_current_recommend_status_only: Callable[..., Any]
|
|
get_recommend_status: Callable[..., Any]
|
|
@property
|
|
def is_ai_recommend_enabled(self) -> bool:
|
|
"""
|
|
返回宿主是否同时启用 Agent 与 AI 搜索推荐。
|
|
"""
|
|
...
|
|
|
|
last_search_params: Callable[..., Any]
|
|
last_search_results: Callable[..., Any]
|
|
matches_music_resource: Callable[..., Any]
|
|
music_site_keywords: Callable[..., Any]
|
|
process: Callable[..., list[Context]]
|
|
record_subscription_site_budget_failure: Callable[..., Any]
|
|
consume_subscription_site_budget_failures: Callable[..., Any]
|
|
record_subscription_site_budget_deferred: Callable[..., Any]
|
|
consume_subscription_site_budget_deferrals: Callable[..., Any]
|
|
save_last_search_params: Callable[..., Any]
|
|
search_by_id: Callable[..., Any]
|
|
search_by_title: Callable[..., Any]
|
|
start_recommend_task: Callable[..., Any]
|
|
else:
|
|
_SearchOwnerBase = ChainBase
|