Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 附件接口拆分优化 #668

Open
1 task done
chivehao opened this issue Sep 16, 2024 · 0 comments
Open
1 task done

[Feature] 附件接口拆分优化 #668

chivehao opened this issue Sep 16, 2024 · 0 comments
Labels
feature New feature or request

Comments

@chivehao
Copy link
Member

chivehao commented Sep 16, 2024

创建前查询

  • 我已经在 issues 列表 里查询过,并且没找到类似的问题。

描述

附件接口需要拆分,
一类用于批量查询的基础的元数据,只有基本的比如name, cover等信息
一类则是附带访问地址的数据,比如url、存储策略等

优化点:

  • 批量查询附件的响应速度
  • 只有进行偏重操作时,才会去获取访问地址,比如播放视频前获取播放url等

预测变动: 主要调整附件服务层的逻辑

使用案例

在使用alist插件导入115网盘的数据时,由于接口限制,无法成功批量导入,
考虑插件导入时,不去请求具体的文件数据接口,给url配置成 诸如{plugin-name}@@@{path}{att-name}的格式,
然后在getAttById方法里进行判断,根据插件名称查找插件的实现,然后通过插件请求alist获取文件签名数据,拼接直链url返回,core拿到直链保存到数据库,然后返回给用户。

@chivehao chivehao added the feature New feature or request label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant