This commit is contained in:
jxxghp
2024-10-12 12:32:50 +08:00
parent 0d139851af
commit 4e3a76ffa3
4 changed files with 24 additions and 24 deletions

View File

@@ -101,7 +101,7 @@ class ChainBase(metaclass=ABCMeta):
try:
module_name = module.get_name()
except Exception as err:
logger.error(f"获取模块名称出错:{str(err)}")
logger.debug(f"获取模块名称出错:{str(err)}")
module_name = module_id
try:
func = getattr(module, method)

View File

@@ -127,11 +127,11 @@ class TmdbChain(ChainBase, metaclass=Singleton):
return None
@cached(cache=TTLCache(maxsize=1, ttl=3600))
def get_trending_wallpapers(self, num: int = 10) -> Optional[List[str]]:
def get_trending_wallpapers(self, num: int = 10) -> List[str]:
"""
获取所有流行壁纸
"""
infos = self.tmdb_trending()
if infos:
return [info.backdrop_path for info in infos if info and info.backdrop_path][:num]
return None
return []