mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-03-20 03:57:30 +08:00
Add flag to ignore check folder modtime for rclone snapshot
This commit is contained in:
@@ -311,7 +311,8 @@ class ConfigModel(BaseModel):
|
||||
DOCKER_CLIENT_API: Optional[str] = "tcp://127.0.0.1:38379"
|
||||
# 工作流数据共享
|
||||
WORKFLOW_STATISTIC_SHARE: bool = True
|
||||
|
||||
# 对rclone进行快照对比时,是否检查文件夹的修改时间
|
||||
RCLONE_SNAPSHOT_CHECK_FOLDER_MODTIME = True
|
||||
|
||||
class Settings(BaseSettings, ConfigModel, LogConfigModel):
|
||||
"""
|
||||
|
||||
@@ -13,6 +13,7 @@ class StorageBase(metaclass=ABCMeta):
|
||||
"""
|
||||
schema = None
|
||||
transtype = {}
|
||||
snapshot_check_folder_modtime = True
|
||||
|
||||
def __init__(self):
|
||||
self.storagehelper = StorageHelper()
|
||||
@@ -214,7 +215,8 @@ class StorageBase(metaclass=ABCMeta):
|
||||
return
|
||||
|
||||
# 增量检查:如果目录修改时间早于上次快照,跳过
|
||||
if (last_snapshot_time and
|
||||
if (self.snapshot_check_folder_modtime and
|
||||
last_snapshot_time and
|
||||
_fileitm.modify_time and
|
||||
_fileitm.modify_time <= last_snapshot_time):
|
||||
return
|
||||
|
||||
@@ -26,6 +26,8 @@ class Rclone(StorageBase):
|
||||
"copy": "复制"
|
||||
}
|
||||
|
||||
snapshot_check_folder_modtime = settings.RCLONE_SNAPSHOT_CHECK_FOLDER_MODTIME
|
||||
|
||||
def init_storage(self):
|
||||
"""
|
||||
初始化
|
||||
|
||||
Reference in New Issue
Block a user