This commit is contained in:
jxxghp
2025-08-04 20:50:06 +08:00
parent 770a50764e
commit 210813367f
2 changed files with 13 additions and 1 deletions

View File

@@ -102,7 +102,8 @@ async def search(title: str,
for index, source in enumerate(setting_order):
sort_order[source] = index
result = sorted(result, key=lambda x: sort_order.get(__get_source(x), 4))
return result[(page - 1) * count:page * count]
return result[(page - 1) * count:page * count]
return []
@router.post("/scrape/{storage}", summary="刮削媒体信息", response_model=schemas.Response)

View File

@@ -657,6 +657,17 @@ class TheMovieDbModule(_ModuleBase):
return [MediaInfo(tmdb_info=info) for info in results]
return []
async def async_search_collections(self, name: str) -> Optional[List[MediaInfo]]:
"""
异步搜索集合信息
"""
if not name:
return []
results = await self.tmdb.async_search_collections(name)
if results:
return [MediaInfo(tmdb_info=info) for info in results]
return []
def tmdb_collection(self, collection_id: int) -> Optional[List[MediaInfo]]:
"""
根据合集ID查询集合