diff --git a/logs/all.log b/logs/all.log index 9339686..d551faa 100644 --- a/logs/all.log +++ b/logs/all.log @@ -7,3 +7,6 @@ 2024-12-20 14:01:14.904 |INFO | funbuild.core.core : core: 86 | funbuild | - fundrive build 2024-12-20 14:01:14.904 |INFO | funbuild.core.core : core: 74 | funbuild | - fundrive pull 2024-12-20 14:01:23.129 |INFO | funbuild.core.core : core: 78 | funbuild | - fundrive push +2024-12-20 15:10:44.414 |INFO | funbuild.core.core : core: 86 | funbuild | - fundrive build +2024-12-20 15:10:44.414 |INFO | funbuild.core.core : core: 74 | funbuild | - fundrive pull +2024-12-20 15:10:52.221 |INFO | funbuild.core.core : core: 78 | funbuild | - fundrive push diff --git a/logs/funbuild.log b/logs/funbuild.log index 9339686..d551faa 100644 --- a/logs/funbuild.log +++ b/logs/funbuild.log @@ -7,3 +7,6 @@ 2024-12-20 14:01:14.904 |INFO | funbuild.core.core : core: 86 | funbuild | - fundrive build 2024-12-20 14:01:14.904 |INFO | funbuild.core.core : core: 74 | funbuild | - fundrive pull 2024-12-20 14:01:23.129 |INFO | funbuild.core.core : core: 78 | funbuild | - fundrive push +2024-12-20 15:10:44.414 |INFO | funbuild.core.core : core: 86 | funbuild | - fundrive build +2024-12-20 15:10:44.414 |INFO | funbuild.core.core : core: 74 | funbuild | - fundrive pull +2024-12-20 15:10:52.221 |INFO | funbuild.core.core : core: 78 | funbuild | - fundrive push diff --git a/pyproject.toml b/pyproject.toml index f854a70..2981ca1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "fundrive" -version = "1.2.77" +version = "1.2.78" description = "fundrive" readme = "README.md" requires-python = ">=3.8" diff --git a/src/fundrive/core/base.py b/src/fundrive/core/base.py index 4d27f31..0c57067 100644 --- a/src/fundrive/core/base.py +++ b/src/fundrive/core/base.py @@ -107,7 +107,14 @@ def download_file(self, fid, local_dir, overwrite=False, *args, **kwargs) -> boo raise NotImplementedError() def download_dir( - self, fid, local_dir, recursion=True, overwrite=False, *args, **kwargs + self, + fid, + local_dir, + recursion=True, + overwrite=False, + ignore_filter=None, + *args, + **kwargs, ) -> bool: """ 下载目录 @@ -117,6 +124,7 @@ def download_dir( :param overwrite: :param args: :param kwargs: + :param ignore_filter :return: """ if not self.exist(fid): @@ -124,7 +132,9 @@ def download_dir( if not os.path.exists(local_dir): os.makedirs(local_dir, exist_ok=True) for file in self.get_file_list(fid): - _drive_path = file["fid"] + if ignore_filter and ignore_filter(file.name): + continue + _drive_path = file.fid self.download_file( fid=file.fid, local_dir=local_dir, overwrite=overwrite, *args, **kwargs ) diff --git a/uv.lock b/uv.lock index 330c6ac..12ed916 100644 --- a/uv.lock +++ b/uv.lock @@ -451,7 +451,7 @@ wheels = [ [[package]] name = "fundrive" -version = "1.2.77" +version = "1.2.78" source = { virtual = "." } dependencies = [ { name = "funget" },