alroyso 1 year ago
parent
commit
9993babbf5
1 changed files with 0 additions and 12 deletions
  1. 0 12
      src/task/Aria2FileCopyTask.py

+ 0 - 12
src/task/Aria2FileCopyTask.py

@@ -63,7 +63,6 @@ class Aria2FileCopyTask:
             downloads = self.aria2_api.get_downloads()
             for download in downloads:
                 if download.is_complete:
-
                     # 检查下载的每个文件
                     for file in download.files:
                         if file.selected:
@@ -74,14 +73,6 @@ class Aria2FileCopyTask:
                             if os.path.exists(file_path) and not os.path.exists(temp_file):
                                 self.move_new_files(self.download_path, self.destination_path)
 
-                    # 检查下载路径是否存在并且里面是否有文件
-                    if os.path.exists(self.download_path) and os.listdir(self.download_path):
-                        # 无论 Aria2 是否有记录,都执行移动操作
-                        self.move_new_files(self.download_path, self.destination_path)
-
-                    else:
-                        logging.info("No new files to move.")
-
             time.sleep(10)
 
     def nas_sync(self):
@@ -116,7 +107,6 @@ class Aria2FileCopyTask:
                 else:
                     # 如果目标目录已存在,递归处理子目录内容
                     self.move_new_files(src_item, dest_item)
-
             elif not item.endswith('.aria2'):  # 检查是否为 .aria2 文件
                 # 如果是文件,且不是 .aria2 文件,则进行移动
                 if not os.path.exists(dest_item):
@@ -128,5 +118,3 @@ class Aria2FileCopyTask:
                     logging.info("Completed checking for new files to move.")
                 else:
                     logging.info(f"File already exists, skipping: {dest_item}")
-
-