Skip to content

Commit 8082260

Browse files
awordxAkimioJR
authored andcommitted
增加异步递归函数获取媒体库海报
1 parent b577b12 commit 8082260

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/modules/libraryposter/poster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async def get_libraries(self) -> list[dict[str, Any]]:
9393

9494
return resp.json()["Items"]
9595

96-
async def get_library_items(#修改的函数
96+
async def get_library_items(
9797
self,
9898
library_id: str,
9999
user_id: str = "",
@@ -122,7 +122,7 @@ async def get_library_items(#修改的函数
122122
)
123123
return []
124124

125-
while len(all_items) < 15 and max_depth <= 5:
125+
while len(all_items) < 15 and max_depth <= 5:#如果当前目录获取的海报小于15张,那么增加一级文件夹层级获取更多海报,最多5个级别
126126
all_items = await self.fetch_items(library_id, user_id, max_depth=max_depth)
127127
max_depth += 1
128128

0 commit comments

Comments
 (0)