mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-04-05 03:38:36 +08:00
fix bug
This commit is contained in:
@@ -240,7 +240,7 @@ class TransferChain(ChainBase, metaclass=Singleton):
|
||||
|
||||
if not transferinfo.success:
|
||||
# 转移失败
|
||||
logger.warn(f"{task.file_path.name} 入库失败:{transferinfo.message}")
|
||||
logger.warn(f"{task.fileitem.name} 入库失败:{transferinfo.message}")
|
||||
# 新增转移失败历史记录
|
||||
self.transferhis.add_fail(
|
||||
fileitem=task.fileitem,
|
||||
@@ -267,7 +267,7 @@ class TransferChain(ChainBase, metaclass=Singleton):
|
||||
return
|
||||
|
||||
# 转移成功
|
||||
logger.info(f"{task.file_path.name} 入库成功:{transferinfo.target_diritem.path}")
|
||||
logger.info(f"{task.fileitem.name} 入库成功:{transferinfo.target_diritem.path}")
|
||||
|
||||
# 新增转移成功历史记录
|
||||
self.transferhis.add_success(
|
||||
@@ -360,8 +360,10 @@ class TransferChain(ChainBase, metaclass=Singleton):
|
||||
# 启动进度
|
||||
self.progress.start(ProgressKey.FileTransfer)
|
||||
total_num = self.jobview.total()
|
||||
__process_msg = f"开始整理队列处理,共 {total_num} 个文件或子目录 ..."
|
||||
logger.info(__process_msg)
|
||||
self.progress.update(value=0,
|
||||
text=f"开始整理队列处理,共 {total_num} 个文件或子目录 ...",
|
||||
text=__process_msg,
|
||||
key=ProgressKey.FileTransfer)
|
||||
# 队列已开始
|
||||
__queue_start = False
|
||||
@@ -853,7 +855,7 @@ class TransferChain(ChainBase, metaclass=Singleton):
|
||||
)
|
||||
logger.info(f"{file_path.name} 已添加到整理队列")
|
||||
|
||||
return True, "\n".join(err_msgs)
|
||||
return True, "\n".join(err_msgs) if err_msgs else f"{fileitem.name} 已添加到整理任务队列"
|
||||
|
||||
def remote_transfer(self, arg_str: str, channel: MessageChannel,
|
||||
userid: Union[str, int] = None, source: str = None):
|
||||
|
||||
@@ -43,6 +43,8 @@ class TransferHistory(Base):
|
||||
episodes = Column(String)
|
||||
# 海报
|
||||
image = Column(String)
|
||||
# 下载器
|
||||
downloader = Column(String)
|
||||
# 下载器hash
|
||||
download_hash = Column(String, index=True)
|
||||
# 转移成功状态
|
||||
|
||||
30
database/versions/55390f1f77c1_2_0_9.py
Normal file
30
database/versions/55390f1f77c1_2_0_9.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""2.0.9
|
||||
|
||||
Revision ID: 55390f1f77c1
|
||||
Revises: bf28a012734c
|
||||
Create Date: 2024-12-24 13:29:32.225532
|
||||
|
||||
"""
|
||||
import contextlib
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import sqlite
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '55390f1f77c1'
|
||||
down_revision = 'bf28a012734c'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
# 整理历史记录 增加下载器字段
|
||||
with contextlib.suppress(Exception):
|
||||
op.add_column('transferhistory', sa.Column('downloader', sa.String(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
pass
|
||||
Reference in New Issue
Block a user