diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 508eb4dc..3ee9f3a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,9 @@ name: MoviePilot Builder on: workflow_dispatch: + push: + branches: + - dev jobs: Docker-build: diff --git a/app/chain/transfer.py b/app/chain/transfer.py index b576f2a7..77f63564 100644 --- a/app/chain/transfer.py +++ b/app/chain/transfer.py @@ -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, diff --git a/app/modules/qbittorrent/__init__.py b/app/modules/qbittorrent/__init__.py index 0b0c8585..fec4051c 100644 --- a/app/modules/qbittorrent/__init__.py +++ b/app/modules/qbittorrent/__init__.py @@ -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,