diff --git a/app/modules/filetransfer/__init__.py b/app/modules/filetransfer/__init__.py index da5d381f..962e90b0 100644 --- a/app/modules/filetransfer/__init__.py +++ b/app/modules/filetransfer/__init__.py @@ -54,7 +54,7 @@ class FileTransferModule(_ModuleBase): target_path=target_path, message=msg, file_count=file_count, - file_size=file_size, + total_size=file_size, fail_list=fail_list) @staticmethod @@ -389,7 +389,7 @@ class FileTransferModule(_ModuleBase): # 计算大小 total_filesize += in_path.stat().st_size # 返回转移后的路径 - return new_path, total_filesize, total_filesize, [], "" + return new_path, total_num, total_filesize, [], "" else: # 获取文件清单 transfer_files: List[Path] = SystemUtils.list_files_with_extensions(in_path, settings.RMT_MEDIAEXT) @@ -454,7 +454,7 @@ class FileTransferModule(_ModuleBase): # 计算文件数 total_num += 1 # 计算大小 - total_filesize += transfer_file.stat().st_size + total_filesize += new_file.stat().st_size except Exception as err: err_msgs.append(f"{transfer_file.name}:{err}") logger.error(f"{transfer_file}转移失败:{err}") diff --git a/app/modules/subtitle/__init__.py b/app/modules/subtitle/__init__.py index c7a2a02f..c934cd2c 100644 --- a/app/modules/subtitle/__init__.py +++ b/app/modules/subtitle/__init__.py @@ -62,7 +62,7 @@ class SubtitleModule(_ModuleBase): if download_dir.is_file(): download_dir = download_dir.parent # 读取网站代码 - request = RequestUtils(cookies=torrent.site_cookie, headers=torrent.site_ua) + request = RequestUtils(cookies=torrent.site_cookie, ua=torrent.site_ua) res = request.get_res(torrent.page_url) if res and res.status_code == 200: if not res.text: diff --git a/app/modules/telegram/telegram.py b/app/modules/telegram/telegram.py index fa24252c..438e5f10 100644 --- a/app/modules/telegram/telegram.py +++ b/app/modules/telegram/telegram.py @@ -52,7 +52,7 @@ class Telegram(metaclass=Singleton): 定义线程函数来运行 infinity_polling """ try: - _bot.infinity_polling(long_polling_timeout=5) + _bot.infinity_polling(long_polling_timeout=10) except Exception as err: logger.error(f"Telegram消息接收服务异常:{err}")