Merge remote-tracking branch 'origin/main'
This commit is contained in:
@ -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}")
|
||||
|
@ -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:
|
||||
|
@ -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}")
|
||||
|
||||
|
Reference in New Issue
Block a user