fix db session

This commit is contained in:
jxxghp
2023-10-18 08:35:16 +08:00
parent 84f5ce8a0b
commit fb78a07662
49 changed files with 170 additions and 224 deletions

View File

@ -75,10 +75,10 @@ def delete_transfer_history(history_in: schemas.TransferHistory,
return schemas.Response(success=False, msg="记录不存在")
# 册除媒体库文件
if deletedest and history.dest:
TransferChain(db).delete_files(Path(history.dest))
TransferChain().delete_files(Path(history.dest))
# 删除源文件
if deletesrc and history.src:
TransferChain(db).delete_files(Path(history.src))
TransferChain().delete_files(Path(history.src))
# 发送事件
eventmanager.send_event(
EventType.DownloadFileDeleted,