mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-28 03:27:31 +08:00
Merge pull request #2977 from wdmcheng/v2
This commit is contained in:
+4
-4
@@ -193,8 +193,8 @@ class SystemUtils:
|
|||||||
pattern = r".*"
|
pattern = r".*"
|
||||||
|
|
||||||
# 遍历目录及子目录
|
# 遍历目录及子目录
|
||||||
for matched_glob in glob(str(directory / '**'), recursive=recursive, include_hidden=True):
|
for matched_glob in glob('**', root_dir=directory, recursive=recursive, include_hidden=True):
|
||||||
path = Path(matched_glob)
|
path = directory.joinpath(matched_glob)
|
||||||
if path.is_file() \
|
if path.is_file() \
|
||||||
and re.match(pattern, path.name, re.IGNORECASE) \
|
and re.match(pattern, path.name, re.IGNORECASE) \
|
||||||
and path.stat().st_size >= min_filesize * 1024 * 1024:
|
and path.stat().st_size >= min_filesize * 1024 * 1024:
|
||||||
@@ -229,8 +229,8 @@ class SystemUtils:
|
|||||||
pattern = r".*(" + "|".join(extensions) + ")$"
|
pattern = r".*(" + "|".join(extensions) + ")$"
|
||||||
|
|
||||||
# 遍历目录及子目录
|
# 遍历目录及子目录
|
||||||
for matched_glob in glob(str(directory / '**'), recursive=recursive, include_hidden=True):
|
for matched_glob in glob('**', root_dir=directory, recursive=recursive, include_hidden=True):
|
||||||
path = Path(matched_glob)
|
path = directory.joinpath(matched_glob)
|
||||||
if path.is_file() \
|
if path.is_file() \
|
||||||
and re.match(pattern, path.name, re.IGNORECASE) \
|
and re.match(pattern, path.name, re.IGNORECASE) \
|
||||||
and path.stat().st_size >= min_filesize * 1024 * 1024:
|
and path.stat().st_size >= min_filesize * 1024 * 1024:
|
||||||
|
|||||||
Reference in New Issue
Block a user