2 Commits
v1.1 ... v1.2

Author SHA1 Message Date
dnslin
64fa02d0b6 fix: 修复文件名过长的错误 2025-12-15 16:21:50 +08:00
dnslin
64b3740bb4 fix: 调整镜像版本 2025-12-15 16:16:37 +08:00
3 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
services: services:
aria2bot: aria2bot:
# 方式一:使用预构建镜像(推荐) # 方式一:使用预构建镜像(推荐)
image: dnslin/aria2bot:latest image: dnslin/aria2bot:v1.1
# 方式二:本地构建(取消下行注释,注释上行) # 方式二:本地构建(取消下行注释,注释上行)
# build: . # build: .
container_name: aria2bot container_name: aria2bot

View File

@@ -225,7 +225,7 @@ class Aria2RpcClient:
return DownloadTask( return DownloadTask(
gid=data.get("gid", ""), gid=data.get("gid", ""),
status=data.get("status", "unknown"), status=data.get("status", "unknown"),
name=name[:40] if len(name) > 40 else name, # 截断文件名 name=name, # 保留完整文件名,显示时再截断
total_length=int(data.get("totalLength", 0)), total_length=int(data.get("totalLength", 0)),
completed_length=int(data.get("completedLength", 0)), completed_length=int(data.get("completedLength", 0)),
download_speed=int(data.get("downloadSpeed", 0)), download_speed=int(data.get("downloadSpeed", 0)),

View File

@@ -778,7 +778,7 @@ class Aria2BotAPI:
local_path = Path(task.dir) / task.name local_path = Path(task.dir) / task.name
if not local_path.exists(): if not local_path.exists():
logger.error(f"频道上传失败:本地文件不存在 GID={gid}") logger.error(f"频道上传失败:本地文件不存在 GID={gid}, dir={task.dir}, name={task.name}, path={local_path}")
return return
# 检查文件大小 # 检查文件大小