mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
fix: 修复 storagechain.list_files 递归得到的列表被覆盖的问题
This commit is contained in:
@@ -227,8 +227,8 @@ class TransferChain(ChainBase):
|
|||||||
and not (trans_item.storage == "local" and SystemUtils.is_bluray_dir(item_path))):
|
and not (trans_item.storage == "local" and SystemUtils.is_bluray_dir(item_path))):
|
||||||
# 遍历获取下载目录所有文件(递归)
|
# 遍历获取下载目录所有文件(递归)
|
||||||
file_items = self.storagechain.list_files(trans_item, recursion=True)
|
file_items = self.storagechain.list_files(trans_item, recursion=True)
|
||||||
if not file_items:
|
if file_items:
|
||||||
continue
|
file_items.extend(trans_items)
|
||||||
else:
|
else:
|
||||||
# 文件或蓝光目录
|
# 文件或蓝光目录
|
||||||
file_items.append(trans_item)
|
file_items.append(trans_item)
|
||||||
@@ -248,7 +248,7 @@ class TransferChain(ChainBase):
|
|||||||
|
|
||||||
# 更新总文件数
|
# 更新总文件数
|
||||||
total_num = len(file_items)
|
total_num = len(file_items)
|
||||||
logger.info(f"正在整理 {len(file_items)} 个文件...")
|
logger.info(f"正在整理 {total_num} 个文件...")
|
||||||
|
|
||||||
# 整理所有文件
|
# 整理所有文件
|
||||||
for file_item in file_items:
|
for file_item in file_items:
|
||||||
|
|||||||
Reference in New Issue
Block a user