mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
fix(search): include plugin resources without indexers (#6399)
This commit is contained in:
@@ -55,6 +55,12 @@ class SearchChainAIRecommendTest(unittest.IsolatedAsyncioTestCase):
|
||||
chain.save_cache = lambda _cache, _filename: None
|
||||
chain.remove_cache = lambda _filename: None
|
||||
chain.get_search_page_size = IndexerModule.get_search_page_size
|
||||
chain.search_plugin_torrents = lambda **_kwargs: []
|
||||
|
||||
async def no_plugin_results(**_kwargs):
|
||||
return []
|
||||
|
||||
chain.async_search_plugin_torrents = no_plugin_results
|
||||
return chain
|
||||
|
||||
async def test_start_recommend_task_restores_original_indices(self):
|
||||
@@ -185,7 +191,7 @@ class SearchChainAIRecommendTest(unittest.IsolatedAsyncioTestCase):
|
||||
for index in range(count)
|
||||
]
|
||||
|
||||
chain.search_torrents = search_torrents
|
||||
chain.search_site_torrents = search_torrents
|
||||
|
||||
with (
|
||||
patch.object(settings, "SEARCH_RESOURCE_PAGES", 4, create=True),
|
||||
@@ -231,7 +237,7 @@ class SearchChainAIRecommendTest(unittest.IsolatedAsyncioTestCase):
|
||||
for index in range(count)
|
||||
]
|
||||
|
||||
chain.search_torrents = search_torrents
|
||||
chain.search_site_torrents = search_torrents
|
||||
|
||||
with (
|
||||
patch.object(settings, "SEARCH_RESOURCE_PAGES", 3, create=True),
|
||||
@@ -277,7 +283,7 @@ class SearchChainAIRecommendTest(unittest.IsolatedAsyncioTestCase):
|
||||
for index in range(count)
|
||||
]
|
||||
|
||||
chain.search_torrents = search_torrents
|
||||
chain.search_site_torrents = search_torrents
|
||||
|
||||
with (
|
||||
patch.object(settings, "SEARCH_RESOURCE_PAGES", 3, create=True),
|
||||
@@ -342,7 +348,7 @@ class SearchChainAIRecommendTest(unittest.IsolatedAsyncioTestCase):
|
||||
for index in range(count)
|
||||
]
|
||||
|
||||
chain.async_search_torrents = async_search_torrents
|
||||
chain.async_search_site_torrents = async_search_torrents
|
||||
|
||||
with (
|
||||
patch.object(settings, "SEARCH_RESOURCE_PAGES", 4, create=True),
|
||||
@@ -388,7 +394,7 @@ class SearchChainAIRecommendTest(unittest.IsolatedAsyncioTestCase):
|
||||
for index in range(count)
|
||||
]
|
||||
|
||||
chain.async_search_torrents = async_search_torrents
|
||||
chain.async_search_site_torrents = async_search_torrents
|
||||
|
||||
with (
|
||||
patch.object(settings, "SEARCH_RESOURCE_PAGES", 3, create=True),
|
||||
|
||||
Reference in New Issue
Block a user