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