Skip to content

建议给 AList 加本地文件索引库!网盘只存文件,浏览查属性全走本地库 #9585

Description

@linsan970809

Please make sure of the following things

  • I have read the documentation.
  • I'm sure there are no duplicate issues or discussions.
  • I'm sure this feature is not implemented.
  • I'm sure it's a reasonable and popular requirement.

Description of the feature / 需求描述

现状痛点
现在用alist挂载网盘有两个很糟糕的问题:第一,文件大小、修改时间这类属性无法实时、精准拿到;第二,打开文件夹、全盘扫描文件速度极慢,每次浏览目录都要调用疯狂网盘API、反复读取云端数据,又耗流量又卡加载。

Suggested solution / 实现思路

实现思路
我的改造想法
把网盘只当成部分放真实文件的“仓库硬盘”,存储使用Crypt的思路,但是所有文件信息全部本地数据库里:文件名、空格路径、文件大小、修改时间、目录结构这些元数据,一律本地存在存储库。
平时浏览文件夹、查看文件大小、刷新列表,删除文件,全部直接读取本地数据库数据就行,不用下次都去请求网盘接口。调用次数、降低云端读写压力,浏览文件的响应速度直接拉满。

数据备份兜底方案
程序空闲稳定一两分钟后,自动把一份本地元数据库文件上传到网盘里。即使本地数据丢了也能找回索引,兼顾了访问速度和数据安全性。

闲时慢速同步索引
设置半夜两三点慢慢的再对一遍索引,保证本地索引的有效又不会对云盘造成太大的负担

Additional context / 附件

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions