mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
fix douban
This commit is contained in:
@@ -938,6 +938,8 @@ class DoubanModule(_ModuleBase):
|
|||||||
"""
|
"""
|
||||||
搜索人物信息
|
搜索人物信息
|
||||||
"""
|
"""
|
||||||
|
if settings.SEARCH_SOURCE and "douban" not in settings.SEARCH_SOURCE:
|
||||||
|
return None
|
||||||
if not name:
|
if not name:
|
||||||
return []
|
return []
|
||||||
result = self.doubanapi.person_search(keyword=name)
|
result = self.doubanapi.person_search(keyword=name)
|
||||||
@@ -956,6 +958,8 @@ class DoubanModule(_ModuleBase):
|
|||||||
"""
|
"""
|
||||||
搜索人物信息(异步版本)
|
搜索人物信息(异步版本)
|
||||||
"""
|
"""
|
||||||
|
if settings.SEARCH_SOURCE and "douban" not in settings.SEARCH_SOURCE:
|
||||||
|
return None
|
||||||
if not name:
|
if not name:
|
||||||
return []
|
return []
|
||||||
result = await self.doubanapi.async_person_search(keyword=name)
|
result = await self.doubanapi.async_person_search(keyword=name)
|
||||||
|
|||||||
@@ -639,6 +639,8 @@ class TheMovieDbModule(_ModuleBase):
|
|||||||
"""
|
"""
|
||||||
搜索人物信息
|
搜索人物信息
|
||||||
"""
|
"""
|
||||||
|
if settings.SEARCH_SOURCE and "themoviedb" not in settings.SEARCH_SOURCE:
|
||||||
|
return None
|
||||||
if not name:
|
if not name:
|
||||||
return []
|
return []
|
||||||
results = self.tmdb.search_persons(name)
|
results = self.tmdb.search_persons(name)
|
||||||
@@ -646,6 +648,19 @@ class TheMovieDbModule(_ModuleBase):
|
|||||||
return [MediaPerson(source='themoviedb', **person) for person in results]
|
return [MediaPerson(source='themoviedb', **person) for person in results]
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
async def async_search_persons(self, name: str) -> Optional[List[MediaPerson]]:
|
||||||
|
"""
|
||||||
|
异步搜索人物信息
|
||||||
|
"""
|
||||||
|
if settings.SEARCH_SOURCE and "themoviedb" not in settings.SEARCH_SOURCE:
|
||||||
|
return None
|
||||||
|
if not name:
|
||||||
|
return []
|
||||||
|
results = await self.tmdb.async_search_persons(name)
|
||||||
|
if results:
|
||||||
|
return [MediaPerson(source='themoviedb', **person) for person in results]
|
||||||
|
return []
|
||||||
|
|
||||||
def search_collections(self, name: str) -> Optional[List[MediaInfo]]:
|
def search_collections(self, name: str) -> Optional[List[MediaInfo]]:
|
||||||
"""
|
"""
|
||||||
搜索集合信息
|
搜索集合信息
|
||||||
|
|||||||
Reference in New Issue
Block a user