Skip to content

Commit

Permalink
perfect(Alist2Strm):非RawURL模式不请求AlistPath的详细信息,减少对网盘API的请求
Browse files Browse the repository at this point in the history
  • Loading branch information
Akimio521 committed Sep 23, 2024
1 parent ab1d0fb commit 8814b24
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/modules/alist2strm/alist2strm.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ def filter(path: AlistPath) -> bool:
)
self.mode = "AlistURL"

if self.mode == "RawURL":
is_detail = True
else:
is_detail = False

async with self.__max_workers:
async with ClientSession() as session:
self.session = session
Expand All @@ -120,7 +125,7 @@ def filter(path: AlistPath) -> bool:
self.url, self.username, self.password
) as client:
async for path in client.iter_path(
dir_path=self.source_dir, filter=filter
dir_path=self.source_dir, is_detail=is_detail, filter=filter
):
_create_task(self.__file_processer(path))
logger.info("Alist2Strm处理完成")
Expand Down

0 comments on commit 8814b24

Please sign in to comment.