fix 监控模式下自定义文件保留时长不生效

This commit is contained in:
thsrite
2024-07-17 16:11:22 +08:00
parent 2c907a2cbf
commit 88795be2db
2 changed files with 4 additions and 3 deletions

View File

@@ -542,12 +542,13 @@
"name": "云盘助手",
"description": "本地文件定时转移到云盘,软连接/strm回本地定时清理无效软连接。",
"labels": "云盘",
"version": "2.1.4",
"version": "2.1.5",
"icon": "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/cloudassistant.png",
"author": "thsrite",
"level": 99,
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlgN7RtXlPNXoFE9B67ye\ny2mog/hDDrhBAIJogdvfAgBMZ1qVzIPcBfdjENPJ9kV/F+zOoh0CzEaDufM54ERT\nykK1pQw7yj7quRZDbv5byxVNqI8bJg8zQo8Q66SQ8SP+aftmpFrADKClQ8VcVYzZ\nJ+YDu9H9q+TcvBqVtLyKfAH5T9WAxn0bXEh4OgkJn7oO5eI5+Fsi6Aq9suVN/HyK\nz2bDr237GmXJT4YPn9s7kj4Rypzg2ldiuBwtVnaTw+xjZRlCRr4Gs0eFUIMUqnoQ\nip4Px8Mrq5cqHl0HrJ/av/pJLCN1icCgegYW63b2gjjJwmps9NGGOydRzgoFkqj0\nDwIDAQAB",
"history": {
"v2.1.5": "监控模式下自定义文件保留时长不生效",
"v2.1.4": "自定义文件保留时长,大于该值会被转移",
"v2.1.3": "修复消息通知",
"v2.1.2": "修复清理无效软连接",

View File

@@ -64,7 +64,7 @@ class CloudAssistant(_PluginBase):
# 插件图标
plugin_icon = "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/cloudassistant.png"
# 插件版本
plugin_version = "2.1.4"
plugin_version = "2.1.5"
# 插件作者
plugin_author = "thsrite"
# 作者主页
@@ -418,7 +418,7 @@ class CloudAssistant(_PluginBase):
src_preserve_hierarchy = monitor_dir.get("src_preserve_hierarchy") or 0
# 本地文件保留时间 (小时)
retention_time = monitor_dir.get("retention_time") or 0
if retention_time > 0:
if not self._monitor and retention_time > 0:
creation_time = self.__get_file_creation_time(file_path)
creation_datetime = datetime.datetime.fromtimestamp(creation_time)
current_datetime = datetime.datetime.now()