mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-02-02 18:22:39 +08:00
fix transfer bug
This commit is contained in:
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@@ -1,6 +1,9 @@
|
||||
name: MoviePilot Builder
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
Docker-build:
|
||||
|
||||
@@ -86,7 +86,7 @@ class TransferChain(ChainBase):
|
||||
|
||||
for torrent in torrents:
|
||||
# 文件路径
|
||||
file_path = Path(torrent.path)
|
||||
file_path = torrent.path
|
||||
if not file_path.exists():
|
||||
logger.warn(f"文件不存在:{file_path}")
|
||||
continue
|
||||
@@ -103,7 +103,7 @@ class TransferChain(ChainBase):
|
||||
if not transfer_dirinfo:
|
||||
logger.info(f"文件 {file_path} 不在下载器监控目录中,不通过下载器进行整理")
|
||||
# 设置下载任务状态
|
||||
self.transfer_completed(hashs=torrent.hash, path=torrent.path)
|
||||
self.transfer_completed(hashs=torrent.hash, path=file_path)
|
||||
continue
|
||||
# 查询下载记录识别情况
|
||||
downloadhis: DownloadHistory = self.downloadhis.get_by_hash(torrent.hash)
|
||||
@@ -128,7 +128,7 @@ class TransferChain(ChainBase):
|
||||
self.__do_transfer(
|
||||
fileitem=FileItem(
|
||||
storage="local",
|
||||
path=torrent.path,
|
||||
path=str(file_path),
|
||||
type="dir" if not file_path.is_file() else "file",
|
||||
name=file_path.name,
|
||||
size=file_path.stat().st_size,
|
||||
|
||||
@@ -214,7 +214,7 @@ class QbittorrentModule(_ModuleBase, _DownloaderBase):
|
||||
if content_path:
|
||||
torrent_path = Path(content_path)
|
||||
else:
|
||||
torrent_path = torrent.get('save_path') / torrent.get('name')
|
||||
torrent_path = Path(torrent.get('save_path')) / torrent.get('name')
|
||||
ret_torrents.append(TransferTorrent(
|
||||
title=torrent.get('name'),
|
||||
path=torrent_path,
|
||||
|
||||
Reference in New Issue
Block a user