mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-27 11:11:07 +08:00
fix: 修复阿里云盘目录监控快照无法检测文件的问题
1. 为阿里云盘添加 ALIPAN_SNAPSHOT_CHECK_FOLDER_MODTIME 配置(默认 False)
- 阿里云盘目录的 updated_at 不会随子文件变更而更新,导致增量快照
始终跳过目录,快照结果为空
- 与 Rclone/Alist 保持一致的配置模式
2. 移除 snapshot() 中文件级 modify_time 过滤
- 原逻辑:仅包含 modify_time > last_snapshot_time 的文件
- 问题:首次快照建立基准后,save_snapshot 将 timestamp 设为
max(modify_times),后续快照中未变更的文件因 modify_time 不大于
timestamp 而被排除,导致 compare_snapshots 无法检测到任何变化
- 此外当 last_snapshot_time 为 None 时,比较会触发 TypeError
并被静默捕获
- 修复:始终包含所有遍历到的文件,由 compare_snapshots 负责变化检测
目录级优化仍由 snapshot_check_folder_modtime 控制
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,9 @@ class AliPan(StorageBase, metaclass=WeakSingleton):
|
||||
# 基础url
|
||||
base_url = "https://openapi.alipan.com"
|
||||
|
||||
# 阿里云盘目录时间不随子文件变更而更新,默认关闭目录修改时间检查
|
||||
snapshot_check_folder_modtime = settings.ALIPAN_SNAPSHOT_CHECK_FOLDER_MODTIME
|
||||
|
||||
# 文件块大小,默认10MB
|
||||
chunk_size = 10 * 1024 * 1024
|
||||
|
||||
|
||||
Reference in New Issue
Block a user